-
Notifications
You must be signed in to change notification settings - Fork 3
115 lines (102 loc) · 2.96 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
name: CI
on:
# Triggers the workflow on push but only for the master branch
push:
branches:
- master
- 'renovate/**'
# Triggers the workflow on any pull request
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run build
build-docker:
name: Build (Docker)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build (pandora-server-directory)
uses: docker/build-push-action@v6
with:
context: .
target: pandora-server-directory
tags: pandora/server-directory:latest
- name: Build (pandora-server-shard)
uses: docker/build-push-action@v6
with:
context: .
target: pandora-server-shard
tags: pandora/server-shard:latest
install-common:
name: Check installability of pandora-common
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- run: pnpm install --no-lockfile
working-directory: ./.github/workflows/common-install-check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run type-check:test
- run: pnpm run test --ci --coverage
test-e2e:
name: Test (E2E)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright dependencies and browsers
run: pnpm run -C pandora-tests playwright-setup-ci
- name: Typecheck E2E tests
run: pnpm run -C pandora-tests type-check
- name: Run E2E tests
run: pnpm run -C pandora-tests test-e2e
- name: Collect coverage
run: pnpm run -C pandora-tests coverage:report --reporter=text
- name: Save test report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: pandora-tests/playwright-report/
retention-days: 30