Repository navigation
71 lines (58 loc) · 1.64 KB
/
Copy pathci.yml
File metadata and controls
71 lines (58 loc) · 1.64 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
# Cancel the previous run of the same branch/PR when a new commit is pushed.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
backend:
name: Backend (build and tests)
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
cache: maven
# The integration tests start PostgreSQL with Testcontainers (Docker is available on the runner).
- name: Build and run tests
run: ./mvnw --batch-mode --no-transfer-progress verify
docker:
name: Backend Docker image (build)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
# Makes sure the image used for deployment still builds (nothing is pushed).
- name: Build image
run: docker build --tag worklog-backend ./backend
frontend:
name: Frontend (build and tests)
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build (also type-checks the app)
run: npm run build
- name: Run unit tests
run: npm run test:ci