-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (63 loc) · 1.88 KB
/
tests.yml
File metadata and controls
82 lines (63 loc) · 1.88 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
actionlint:
runs-on: ubuntu-22.04
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Run actionlint
run: make actionlint
eslint:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [ 22.x, 24.x ]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Setup Node.js and dependencies
uses: ./.github/actions/setup-node-deps
with:
node-version: ${{ matrix.node-version }}
- name: Run lint
run: yarn lint
tests:
needs: [ actionlint, eslint ]
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [22.x, 24.x]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Setup Node.js and dependencies
uses: ./.github/actions/setup-node-deps
with:
node-version: ${{ matrix.node-version }}
- name: Run tests
run: yarn test:coverage
- name: Run type tests
run: yarn test:d
- name: Upload coverage to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.node-version }}
path: coverage/
retention-days: 30
- name: Upload coverage reports to Codecov
if: matrix.node-version == '24.x'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
disable_search: true
fail_ci_if_error: true
verbose: true