-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.18 KB
/
node.js.yml
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
name: Node.js CI
on:
push:
branches: [develop]
pull_request:
branches: [main, develop, dependency_updates]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_API_HOST: https://prod-mong-api.skde.org
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4.2.2
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: corepack enable && yarn install
- run: yarn run check-types
- run: yarn run check-format
- run: yarn lint
- run: yarn knip
- run: yarn run test
- name: Code coverage
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v5.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}