-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (73 loc) · 2.09 KB
/
Copy pathcode-checks.yml
File metadata and controls
92 lines (73 loc) · 2.09 KB
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
name: Code Checks
on:
pull_request:
push:
branches:
- master
concurrency:
group: code-checks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
name: Lint, Format, Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint check
run: pnpm run lint:check
- name: Format check
run: pnpm run format:check
- name: Unit tests
run: pnpm run test
e2e-frontend:
name: Frontend E2E Tests
runs-on: ubuntu-latest
needs: checks
services:
mongodb:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.adminCommand({ ping: 1 })' || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: pnpm --filter astriarch-frontend exec playwright install --with-deps chromium
- name: Run frontend E2E
env:
TEST_BACKEND_PORT: 8002
MONGODB_CONNECTION_STRING: mongodb://127.0.0.1:27017/astriarch_v2_test
run: pnpm --filter astriarch-frontend run test:e2e
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
apps/astriarch-frontend/playwright-report
apps/astriarch-frontend/test-results
if-no-files-found: ignore