-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (117 loc) · 3.5 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
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
name: ci
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, labeled]
jobs:
check:
name: check
runs-on: namespace-profile-default
steps:
- name: checkout
uses: actions/checkout@v4
- name: install pnpm
uses: pnpm/action-setup@v4
- name: install deps
run: pnpm install
- name: setup just
uses: extractions/setup-just@v2
- name: lint
run: just lint
- name: format
run: just format-check
- name: typecheck
run: just typecheck
- name: test
run: just test
storybook:
name: storybook
runs-on: namespace-profile-default
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: install pnpm
uses: pnpm/action-setup@v4
- name: install deps
run: pnpm install
- name: setup just
uses: extractions/setup-just@v2
- name: build storybook
run: STORYBOOK_SCREENSHOT_TESTING=true just build-storybook
- name: serve storybook
run: |
mv -f storybook/storybook-static/{iframe,index}.html
pnpm dlx [email protected] -l 4777 storybook/storybook-static &
- name: screenshots
run: |
just visual-test
pnpm dlx @argos-ci/cli upload storybook/visual-tests/screenshots/argos || true
- name: create screenshots pr
id: pr
uses: peter-evans/create-pull-request@v6
if: github.event_name == 'pull_request'
with:
base: ${{ github.head_ref }}
commit-message: '[automated] update screenshots from CI'
branch: screenshots/patch/${{ github.head_ref }}
delete-branch: true
title: update screenshots from CI
- name: pr comment
if: ${{ steps.pr.outputs.pull-request-number }}
uses: mshick/add-pr-comment@v2
with:
message: 'PR for changed screenshots: ${{ steps.pr.outputs.pull-request-url }}'
dashboard:
name: dashboard
runs-on: namespace-profile-default
env:
VITE_API_ENDPOINT: ${{ secrets.STAGING_API_ENDPOINT }}
VITE_TEST_ADMIN_CREDS: ${{ secrets.TEST_ADMIN_CREDS }}
VITE_GTM_ID: not-real
steps:
- name: reset staging # cypress tests depend slightly on staging api state
run: curl --silent ${{ secrets.STAGING_API_RESET_ROUTE }}; true
- name: checkout
uses: actions/checkout@v4
- name: install pnpm
uses: pnpm/action-setup@v4
- name: install deps
run: pnpm install
- name: setup just
uses: extractions/setup-just@v2
- name: build dashboard
run: just build-dash
- name: cypress
uses: cypress-io/[email protected]
with:
start: pnpm --filter @dash/app preview
project: dash/app
- name: upload-videos
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: dash/app/cypress/videos
site:
name: site
runs-on: namespace-profile-default
env:
NEXT_PUBLIC_FORMS_ENDPOINT: /not-real
NEXT_PUBLIC_TURNSTILE_SITEKEY: not-real
steps:
- name: checkout
uses: actions/checkout@v4
- name: install pnpm
uses: pnpm/action-setup@v4
- name: install deps
run: pnpm install
- name: setup just
uses: extractions/setup-just@v2
- name: build site
run: just build-site