-
Notifications
You must be signed in to change notification settings - Fork 152
179 lines (154 loc) · 4.22 KB
/
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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- "**"
env: # Set environment variables for every job and step in this workflow
CLICOLOR: "1" # Enable colors for *NIX commands
PY_COLORS: "1" # Enable colors for Python-based utilities
FORCE_COLOR: "1" # Force colors in the terminal
STREAMLINE_SECRET: ${{ secrets.STREAMLINE_SECRET }}
STREAMLINE_FAMILIES: ${{ secrets.STREAMLINE_FAMILIES }}
jobs:
types:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Build
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
yarn tokens build
yarn tailwind-preset build
yarn components build
yarn tracking build
yarn themer build
- name: Type checks
run: yarn check:types && yarn flow check
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Build
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
yarn tokens build
yarn tailwind-preset build
yarn components build
yarn tracking build
yarn themer build
- name: Lint
run: |
yarn eslint:ci
yarn prettier:test
yarn check:css
unit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Build
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
yarn tokens build
yarn tailwind-preset build
yarn components build
yarn tracking build
yarn themer build
- name: Unit tests
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
run: |
yarn tailwind-preset pretest
yarn test-ci
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Restore Gatsby cache
uses: actions/cache@v3
with:
path: |
docs/.cache
docs/public
key: gatsby-${{ github.ref}}-${{ hashFiles('docs/gatsby-config.js', 'docs/gatsby-node.js') }}
restore-keys: |
gatsby-${{ github.ref}}-
gatsby-
- name: Build
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
yarn orbit-kiwi:build
- name: Check links
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn check:links
test-ct:
name: Test Components
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.39.0-jammy
strategy:
fail-fast: false
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
uses: ./.github/actions/node
- name: Build
run: |
apt-get update
apt-get install zip --yes
yarn tokens build
yarn tailwind-preset build
yarn components build
- name: Test Components
run: yarn components test-ct --shard ${{ matrix.shard }}
- name: Upload Results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: packages/orbit-components/test-results/
retention-days: 7
cypress:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node
uses: ./.github/actions/node
- name: Build
run: |
yarn tokens build
yarn tailwind-preset build
yarn components build
- name: Cypress
uses: cypress-io/github-action@v6
with:
browser: chrome
install: false
working-directory: packages/orbit-components
start: yarn cy:dev