Skip to content

Test

Test #607

Workflow file for this run

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:
- '22.12.x'
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: "${{ matrix.os }}"
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "${{ matrix.node-version }}"
- name: Update Version
if: ${{ inputs.electron-version != '' }}
env:
VERSION: ${{ inputs.electron-version }}
run: node script/update-version.js $VERSION
- name: Use Latest Electron Version
if: ${{ inputs.electron-version == '' }}
run: echo "ELECTRON_CHROMEDRIVER_STABLE_FALLBACK=1" >> $GITHUB_ENV
- name: Install Dependencies
run: yarn install --immutable
- name: Run Tests
run: |
node --version
npm --version
yarn --version
yarn test