-
Notifications
You must be signed in to change notification settings - Fork 31
45 lines (41 loc) · 1.36 KB
/
test.yml
File metadata and controls
45 lines (41 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: test
on:
push:
branches: [main, dev]
pull_request:
branches: [dev, main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Local Unit Test ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: |
npm run lint
npm test
- name: Install Playwright Browsers
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '22.x' }}
run: npx playwright install --with-deps
- name: Runtime test
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '22.x' }}
run: |
npm run build
npm run test-runtime
- name: Generate Coverage
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '22.x' }}
run: npm run cov
- uses: qltysh/qlty-action/coverage@v1
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '22.x' }}
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: ./coverage/lcov.info