-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (100 loc) · 2.84 KB
/
quality-gate.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
name: Ensure necessary software quality gates
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build application
run: pnpm build
quality-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Check with linter
run: pnpm lint
quality-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Check with prettier
run: pnpm prettier:check
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Run unit tests
run: pnpm test:unit
test-e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.48.2-jammy-amd64@sha256:ca6450233e72d43475836930f32bad51cff9258794c6f5f506264dda4276b2cf
env:
HOME: /root
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build application
run: pnpm build
- name: Run Playwright tests
run: pnpm test:e2e
env:
NEXTAUTH_URL: http://localhost:3000
SHIBBOLETH_OIDC_ISSUER_URL: https://sso.hm.edu
SHIBBOLETH_OIDC_SCOPE: openid
NEXTAUTH_SECRET: topsecret
SHIBBOLETH_OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
SHIBBOLETH_OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/
retention-days: 30
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30