-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (52 loc) · 1.37 KB
/
ci.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
45
46
47
48
49
50
51
52
53
54
name: CI
on:
push:
paths:
- 'src/**'
- 'test/**'
branches:
- main
- dev
workflow_dispatch:
jobs:
unit-test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
version: ^9.7.0
run_install: true
- run: pnpm test:unit-test
upload-test:
name: Run upload test
needs: unit-test
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
version: ^9.7.0
run_install: true
- env:
TEST_ADDON_GUID: ${{ secrets.TEST_ADDON_GUID }}
TEST_JWT_ISSUER: ${{ secrets.TEST_JWT_ISSUER }}
TEST_JWT_SECRET: ${{ secrets.TEST_JWT_SECRET }}
run: pnpm test:upload
publish:
name: Publish action
needs:
- unit-test
- upload-test
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: wdzeng/action-of-action@v4