feat: 0.19.0 #459
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: Test | |
on: | |
pull_request: | |
types: [ready_for_review, opened, synchronize, reopened] | |
paths: | |
- '**/tsconfig.json' | |
- 'tests/**/*.ts' | |
- 'src/**/*.ts' | |
- 'jest.config.ts' | |
- 'package-lock.json' | |
branches: | |
- main | |
- 'release/*' | |
jobs: | |
setup-test: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
steps: | |
# subsequent calls to this action will use already downloaded code from the workspace | |
- uses: actions/checkout@v3 | |
test-browser: | |
needs: setup-test | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
node-version: 'latest' | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Run tests on jsdom | |
run: npm run test -- --environment=jsdom | |
test-node: | |
needs: setup-test | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# current and active LTS | |
node: [ 20, 22 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Run tests on node v${{ matrix.node }} | |
run: npm run test | |
test-edge: | |
needs: setup-test | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# current and active LTS | |
node: [ 20, 22 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Run tests on node v${{ matrix.node }} | |
run: npm run test -- --environment=edge-runtime |