-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (92 loc) · 2.99 KB
/
Copy pathqa.yml
File metadata and controls
120 lines (92 loc) · 2.99 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
name: Qa
on:
push:
branches:
- 'main'
- '!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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/ci
- name: Lint
run: yarn lint
type-checking:
if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }}
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/ci
- name: Build
run: yarn build
- name: Link cli binaries
run: yarn link
- name: Ingect secrets
uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5
with:
secrets: ${{ toJSON(secrets) }}
- name: Test (with coverage)
run: yarn test:pkg --coverage
regression-testing:
# Only run on PRs except `changeset` related PRs
if: ${{ !(github.ref == 'refs/heads/main' || 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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/ci
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.version }}
- name: Build
run: yarn build
- name: Link cli binaries
run: yarn link
- name: Ingect secrets
uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f # v1.5
with:
secrets: ${{ toJSON(secrets) }}
- name: Integration tests
run: yarn test:pkg --coverage