Skip to content

Commit

Permalink
test: move test matrix to a scheduled workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
F-Kublin committed Jan 16, 2025
1 parent 31900b1 commit 0886b28
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
schedule:
- cron: 0 12 * * *

jobs:
test:
strategy:
matrix:
node: [18, 20, 22]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: format-and-lint
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests and generate coverage
run: npm run test:coverage

- name: Run e2e tests
run: npm run test:e2e --prefix=test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # Required for private repos
# todo: use lcov-result-merge to combine more results
files: ./packages/core/coverage/lcov.info
flags: unit
fail_ci_if_error: true
8 changes: 2 additions & 6 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ jobs:
run: lac --default-config

test:
strategy:
matrix:
node: [18, 20, 22]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
needs: format-and-lint
steps:
- name: Check out code
Expand All @@ -61,7 +57,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: 20

- name: Install dependencies
run: npm ci
Expand Down

0 comments on commit 0886b28

Please sign in to comment.