-
Notifications
You must be signed in to change notification settings - Fork 243
121 lines (116 loc) · 3.58 KB
/
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# This is a github actions workflow which runs htsjdk tests and spotbugs.
name: Build and Test
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
test:
env:
HTSJDK_SAMTOOLS_BIN: /usr/bin/samtools
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
experimental: [false]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
name: Java ${{ matrix.Java }} build and test
steps:
- uses: actions/checkout@v3
- name: Set up java ${{ matrix.Java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew compileJava
- name: Install Samtools
run: scripts/install-samtools.sh
- name: Start the htsget server
run: scripts/htsget-scripts/start-htsget-test-server.sh
- name: Run tests
run: ./gradlew test jacocoTestReport
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.Java }}
path: build/reports/tests
testExternalApis:
continue-on-error: true
runs-on: ubuntu-latest
name: Tests that require external APIs
steps:
- uses: actions/checkout@v3
- name: Set up java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew compileJava
- name: Run tests
run: ./gradlew testFTP jacocoTestReport
# - name: Upload to codecov
# run: bash <(curl -s https://raw.githubusercontent.com/broadinstitute/codecov-bash-uploader/main/codecov-verified.bash)
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-external-apis
path: build/reports/tests
testFTP:
continue-on-error: true
runs-on: ubuntu-latest
name: FTP tests
steps:
- uses: actions/checkout@v3
- name: Set up java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew compileJava
- name: Run tests
run: ./gradlew testFTP jacocoTestReport
# - name: Upload to codecov
# run: bash <(curl -s https://raw.githubusercontent.com/broadinstitute/codecov-bash-uploader/main/codecov-verified.bash)
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-ftp
path: build/reports/tests
spotBugs:
runs-on: ubuntu-latest
name: SpotBugs
steps:
- uses: actions/checkout@v3
- name: Set up java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew spotBugsMain spotBugsTest
- name: Upload spotBugs Report
if: failure()
uses: actions/upload-artifact@v3
with:
name: spotBugs-Report
path: build/reports/spotbugs