-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.82 KB
/
Copy pathpull-tests.yml
File metadata and controls
78 lines (63 loc) · 1.82 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
name: tests
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml
test-frontend:
if: needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "^10.26.0"
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm
- name: Install frontend dependencies
run: make deps-frontend
- name: Run frontend tests
run: make test-frontend
test-backend:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
cache: true
- name: Install backend dependencies
run: make deps-backend
- name: Build backend
run: make backend
env:
TAGS: bindata
- name: Run backend tests with coverage
run: make unit-test-coverage test-check
env:
TAGS: bindata
CI: "" # Unset CI to skip tests requiring external services (Redis, Elasticsearch, Meilisearch, Azure Storage)
- name: Upload coverage reports
uses: codecov/codecov-action@v5
if: always()
with:
files: ./coverage.out
flags: unittests
name: backend-unit-tests