-
Notifications
You must be signed in to change notification settings - Fork 87
65 lines (54 loc) · 1.54 KB
/
backend_test.yaml
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
name: Backend test
on:
push:
branches:
- main
paths:
- backend/**
- .github/actions/backend_test/**
- .github/workflows/backend_test.yaml
pull_request:
branches:
- main
paths:
- backend/**
- .github/actions/backend_test/**
- .github/workflows/backend_test.yaml
workflow_dispatch:
jobs:
backend-test:
name: Backend module test
runs-on: ubuntu-latest
steps:
- name: Setup timezone
run: sudo timedatectl set-timezone "Asia/Shanghai"
- uses: actions/checkout@v2
- name: Setup Java JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: 'jdk'
java-version: '11'
check-latest: true
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run backend tests
uses: ./.github/actions/backend_test
with:
working-dir: ./backend
- name: Upload Kover coverage reports
uses: codecov/codecov-action@v2
with:
files: ./backend/build/reports/kover/report.xml,./backend/build/reports/kover/html/index.html
## This step allow you to debug via SSH
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# sudo: true