-
Notifications
You must be signed in to change notification settings - Fork 27
148 lines (113 loc) · 3.59 KB
/
qa.yml
File metadata and controls
148 lines (113 loc) · 3.59 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Qa
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- "master"
- "!changeset-release/**"
pull_request:
jobs:
immutable-install:
if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }}
name: Immutable Install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup
uses: ./.github/actions/ci
# The shared install action does not respect the
# `--immutable` flag, so we need to run it here.
- name: Install with lockfile
run: yarn install --immutable
linting:
if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }}
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup
uses: ./.github/actions/ci
- name: Lint
run: yarn format
type-checking:
if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }}
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup
uses: ./.github/actions/ci
- name: TypeScript
run: yarn typecheck
testing:
if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }}
name: Testing
needs: [immutable-install, linting, type-checking]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup
uses: ./.github/actions/ci
- name: Build
run: yarn build
- uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5
with:
secrets: ${{ toJSON(secrets) }}
- name: Test (Examples)
run: |
cd examples
yarn install --immutable
yarn test
- name: Test (Unit)
run: yarn test:unit
- name: Test (Integration)
run: yarn test --coverage
- name: Upload Coverage Report
uses: codecov/codecov-action@v5 #2db07e317924c76f654a414629d71c65876882e2 v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: test-coverage
regression-testing:
if: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/changeset-release/')}}
name: Regression Testing
needs: [testing]
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20]
fail-fast: true
max-parallel: 1
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup
uses: ./.github/actions/ci
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ matrix.version }}
- name: Build
run: yarn build
- uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5
with:
secrets: ${{ toJSON(secrets) }}
- name: Integration tests
run: yarn test
cleanup:
name: cleanup resource
runs-on: ubuntu-latest
# wait for test job
needs: [testing, regression-testing]
# ALWAYS run, even if test failed
if: always()
steps:
- uses: actions/checkout@v4
- uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5
with:
secrets: ${{ toJSON(secrets) }}
- uses: ./.github/actions/cu