-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (74 loc) · 2.02 KB
/
application_unit_tests.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
name: Application Unit Tests
on:
push:
paths:
- "**.css"
- "**.kt"
- "**.png"
- "**.js"
- "**.json"
- "**.snap"
- "**.ts"
- "**.tsx"
- "**.yml"
- ".github/workflows/cicd.yml"
- "infra/configurations/**.properties"
- "infra/docker/app/**"
- "**.sql"
- "backend/pom.xml"
- "backend/build.gradle.kts"
- "Makefile"
- "frontend"
schedule:
- cron: "38 11 */3 * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit_test_backend:
name: Run backend unit tests
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set version and environment profile
uses: ./.github/actions/set-version-and-environment-profile
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
# https://github.com/actions/setup-java/blob/main/README.md#Supported-distributions
distribution: zulu
java-version: 17
- name: Unit test
run: make test-back
unit_test_frontend:
name: Run frontend unit tests
runs-on: ubuntu-22.04
env:
PUPPETEER_SKIP_DOWNLOAD: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./frontend/package-lock.json
node-version: 20
- name: Install Node.js dependencies
run: npm ci
working-directory: ./frontend
- name: Lint Frontend
run: npm run test:lint:partial
working-directory: ./frontend
- name: Check Frontend types
run: npm run test:type
working-directory: ./frontend
- name: Unit test
run: npm run test:unit --coverage
working-directory: ./frontend
- name: Upload coverage
run: npx codecov
working-directory: ./frontend