-
-
Notifications
You must be signed in to change notification settings - Fork 67
61 lines (58 loc) · 1.83 KB
/
unittests.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
name: unit tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
environment: github-actions
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Scala
uses: olafurpg/setup-scala@v12
with:
java-version: [email protected]
- name: Unit Tests
run: |
set -e
sbt +clean coverage +test && sbt coverageReport coverageAggregate && (find $HOME/.sbt -name "*.lock" | xargs rm) && (find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm)
- name: Code Coverage
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Cache .ivy2
uses: actions/cache@v2
with:
path: ~/.ivy2
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/build.sbt') }}
- name: Cache .sbt
uses: actions/cache@v2
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.properties') }}
release:
if: github.repository == 'fulcrumgenomics/fgbio' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
environment: github-actions
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Scala
uses: olafurpg/setup-scala@v12
with:
java-version: [email protected]
- name: Upload to Sonatype
run: |
sbt +publish