Skip to content

Commit

Permalink
ci: switch to GHA (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 authored Dec 10, 2024
1 parent e9fdaf2 commit 80ab634
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 67 deletions.
64 changes: 0 additions & 64 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- main

jobs:
test:
uses: ./.github/workflows/test.yml

release:
name: Release
runs-on: ubuntu-latest
needs: test
environment: npm
permissions:
id-token: write # for CFA and npm provenance
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.x
cache: 'yarn'
- name: Install
run: yarn install --frozen-lockfile
- uses: continuousauth/action@4e8a2573eeb706f6d7300d6a9f3ca6322740b72d # v1.0.5
with:
project-id: ${{ secrets.CFA_PROJECT_ID }}
secret: ${{ secrets.CFA_SECRET }}
npm-token: ${{ secrets.NPM_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test

on:
pull_request:
branches:
- main
schedule:
- cron: '0 22 * * 3'
workflow_call:

permissions:
contents: read

jobs:
test:
name: Test
strategy:
matrix:
electron-version:
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '18.20'
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Install Electron
run: yarn add "electron@${{ matrix.electron-version }}"
- name: Build
run: yarn tsc
- name: Test (Electron 12)
if : ${{ matrix.electron-version == 12 }}
run: xvfb-run yarn test:ci --in-process-gpu
- name: Test (Electron 13+)
if : ${{ matrix.electron-version != 12 }}
run: xvfb-run yarn test:ci
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @electron/remote

[![CircleCI build status](https://circleci.com/gh/electron/remote/tree/main.svg?style=shield)](https://circleci.com/gh/electron/remote/tree/main)
[![Test](https://github.com/electron/remote/actions/workflows/test.yml/badge.svg)](https://github.com/electron/remote/actions/workflows/test.yml)
[![npm version](http://img.shields.io/npm/v/@electron/remote.svg)](https://npmjs.org/package/@electron/remote)

`@electron/remote` is an [Electron](https://electronjs.org) module that bridges
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"scripts": {
"prepare": "tsc",
"test": "electron test --extension=ts --require=ts-node/register --exit --js-flags=--expose_gc",
"test:ci": "yarn test --reporter=mocha-multi-reporters --reporter-options=configFile=.circleci/mocha-reporter-config.json"
"test:ci": "yarn test --reporter=mocha-multi-reporters --reporter-options=configFile=.github/workflows/mocha-reporter-config.json"
},
"files": [
"README.md",
Expand All @@ -41,5 +41,8 @@
"dist/src",
"index.d.ts"
],
"types": "index.d.ts"
"types": "index.d.ts",
"publishConfig": {
"provenance": true
}
}

0 comments on commit 80ab634

Please sign in to comment.