-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: test workflow on GitHub Actions (#119)
* ci: test workflow on GitHub Actions * ci: use bash shell on all platforms
- Loading branch information
1 parent
5edcabe
commit 678e7f8
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
electron-version: | ||
required: true | ||
type: string | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 19 * * 1-5' | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
node-version: | ||
- '20.16.0' | ||
- '18.20.4' | ||
- '16.20.2' | ||
- '14.21.3' | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
exclude: | ||
- os: macos-latest | ||
node-version: 14.21.3 | ||
runs-on: "${{ matrix.os }}" | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: "Use Node.js ${{ matrix.node-version }}" | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | ||
with: | ||
node-version: "${{ matrix.node-version }}" | ||
- name: Update Version | ||
if: ${{ inputs.electron-version != '' }} | ||
run: node script/update-version.js ${{ inputs.electron-version }} | ||
- name: Use Latest Electron Version | ||
if: ${{ inputs.electron-version == '' }} | ||
run: echo "ELECTRON_MKSNAPSHOT_STABLE_FALLBACK=1" >> $GITHUB_ENV | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Run Tests | ||
run: | | ||
node --version | ||
npm --version | ||
npm test |