-
Notifications
You must be signed in to change notification settings - Fork 6
96 lines (77 loc) · 2.79 KB
/
check.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
name: Check code quality
on:
pull_request:
workflow_dispatch:
jobs:
check:
name: Check code quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
- name: 📦 Install dependencies
run: pnpm install
- name: 🔎 Lint
run: pnpm run lint:ci
# we must continue on error here so the eslint results are uploaded to GitHub in the next step.
continue-on-error: true
- name: Upload eslint results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
- name: 🔎 Check formatting
run: pnpm run format:check
- name: 🛠️ Build
run: pnpm run build
working-directory: packages/sit-onyx
- name: 🛠️ Build Storybook
run: pnpm run build:storybook
working-directory: packages/sit-onyx
- name: 🛠️ Build documentation
run: pnpm run build
working-directory: apps/docs
- name: 🚨 Run unit tests
run: pnpm run test:unit:coverage
working-directory: packages/sit-onyx
# install system dependencies for Playwright
# see: https://playwright.dev/python/docs/browsers#install-system-dependencies
- name: 📦 Install Playwright system dependencies
run: pnpm exec playwright install-deps
working-directory: packages/sit-onyx
- name: 🚨 Run component tests
run: pnpm run test:components
working-directory: packages/sit-onyx
- name: 🔎 Type check Storybook utils
run: pnpm run type-check
working-directory: packages/storybook-utils
- name: 🛠️ Build Figma utils
run: pnpm run build
working-directory: packages/figma-utils
# make sure that publint is only run after all packages have been built
- name: Run publint
run: pnpm run publint
- name: Upload test results artifact
uses: actions/upload-artifact@v3
if: always() # needed to also upload test results when they failed (useful for debugging)
with:
name: test-results
path: |
packages/sit-onyx/coverage
packages/sit-onyx/playwright-report
packages/sit-onyx/test-results
- name: Upload Storybook artifact
uses: actions/upload-artifact@v3
with:
name: storybook-static
path: packages/sit-onyx/storybook-static
- name: Upload documentation artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: apps/docs/src/.vitepress/dist