Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enhance our test environment setup #4291

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 49 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Github actions workflow name
name: Nodejs Test
name: CI

# Triggers the workflow on push or pull request events
on:
Expand All @@ -9,13 +9,31 @@ on:
branches: [main, master]

jobs:
platform_spec_test:
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
basic_node_test:
name: 'Basic tests on ubuntu-latest with nodejs v22 (current LTS version)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Install chromium
run: npx playwright install chromium
- name: Run unit test
run: npm run test

windows_and_macos_test:
name: 'Platform tests on ${{matrix.os}} with nodejs v${{matrix.node}}'
needs: basic_node_test
strategy:
matrix:
# Test all mainstream operating system
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18]
os: [macos-latest, windows-latest]
node: [22]
runs-on: ${{ matrix.os }}
steps:
# Pull repo to test machine
Expand All @@ -30,15 +48,18 @@ jobs:
- name: Print put node & npm version
# Output useful info for debugging.
run: node --version && npm --version
- name: Install chromium
run: npx playwright install chromium
- name: Run unit test
run: npm run test

fast_node_test:
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
historical_versions_node_test:
name: 'Historical version nodejs v${{matrix.node}} test'
needs: basic_node_test
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 16, 20]
node: [14, 16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -49,5 +70,25 @@ jobs:
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Install chromium
run: npx playwright install chromium
- name: Run unit test
run: npm run test

allow_failure_testing_for_node23:
name: 'Allow failure for nodejs v23 tests'
needs: basic_node_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 23
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Install chromium
run: npx playwright install chromium
- name: Run unit test
run: npm run test
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading