-
Notifications
You must be signed in to change notification settings - Fork 39
87 lines (74 loc) · 2.23 KB
/
ci-pharmcat.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: PharmCAT CI
on:
workflow_dispatch:
branches:
- '*'
push:
branches:
- '*'
paths:
- '.github/workflows/ci-pharmcat.yml'
- 'src/main/**'
- 'src/test/**'
- 'build.gradle'
# cancel current build on push from the same PR, branch or tag (https://stackoverflow.com/a/72408109/1063501)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
17
21
cache: 'gradle'
- name: Run PharmCAT tests
run: ./gradlew test --no-daemon --info --scan
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-pharmcat-tests-jdk17
path: build/reports/tests/test/index.html
if-no-files-found: ignore
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-pharmcat-tests-jdk17
path: build/reports/tests/test/index.html
if-no-files-found: ignore
- name: Run PharmCAT tests on Java 21
run: ./gradlew testOnJava21 --no-daemon --info --scan
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-pharmcat-tests-jdk21
path: build/reports/tests/test/index.html
if-no-files-found: ignore
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-pharmcat-tests-jdk21
path: build/reports/tests/test/index.html
if-no-files-found: ignore
- name: Codecov
uses: codecov/codecov-action@v3
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: unittests
- name: Send Slack notification on failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: dev
status: FAILED
color: danger