Use Node 18.18.1 for build and testing #1348
Workflow file for this run
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
name: Main CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
version: [ min, 1.82.3, max ] | |
fail-fast: false | |
env: | |
CODE_VERSION: ${{ matrix.version }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.1 | |
cache: npm | |
- name: Run Tests (macOS, windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: | | |
npm run test | |
- name: Run Tests (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test | |
- name: Upload Screenshots | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: screenshots-${{ matrix.os }}-${{ matrix.version }} | |
path: ${{ github.workspace }}/test/**/screenshots/*.png | |
check: | |
if: always() | |
runs-on: ubuntu-latest | |
name: Status Check | |
needs: [ test ] | |
steps: | |
- name: Test Matrix Result | |
run: | | |
echo result = ${{ needs.test.result }} | |
- name: Status Check - success | |
if: ${{ needs.test.result == 'success' }} | |
run: | | |
echo "All tests successfully completed!" | |
exit 0 | |
- name: Status Check - failure | |
if: ${{ needs.test.result != 'success' }} | |
run: | | |
echo "Status Check failed!" | |
exit 1 |