-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (43 loc) · 1.23 KB
/
test-and-release.yaml
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
name: Build and Release
on: push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
main:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Keep npm cache around to speed up installs
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci --no-audit
- name: Compile TypeScript
run: npx tsc
- name: Lint
run: npm run lint
- name: Run unit tests
run: npm test
- name: Build
env:
PUBLIC_VERSION: ${{ github.sha }}
PUBLIC_SENTRY_DSN: ${{ vars.SENTRY_DSN }}
run: npm run build
- name: Install playwright
run: npx playwright install
- name: Run end-to-end tests
run: npm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ env.GITHUB_REPOSITORY }}-${{ github.sha }}
path: build
- name: Semantic release
continue-on-error: true
run: npx semantic-release