-
-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (34 loc) · 870 Bytes
/
test.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
name: Test
on: [ pull_request ]
env:
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.5.0"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
env:
NODE_ENV: test
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: |
npm install -g pnpm@${{ env.PNPM_VERSION }}
pnpm install
- name: Build
run: |
NODE_ENV=test pnpm run build
- name: Run lint
run: |
pnpm run lint
- name: Run tests
run: |
NODE_ENV=test pnpm run start &
pnpm run test:headless