-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.25 KB
/
sbt-coverage.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
name: sbt-coverage
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Instrument for coverage measurement
run: sbt coverage
- name: Run the tests
run: sbt test
- name: Create a report
run: sbt coverageReport
# Note: Enable upload test report when the bug in ScalaTest 3.1.0 (NoClassDefFoundError for flexmaark classes) is fixed.
# - vpeurala, 29.12.2019
# - uses: actions/upload-artifact@v1
# with:
# name: test-report
# path: target/test-reports
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "target/scala-2.12/scoverage-report"
- uses: actions/upload-artifact@v2
if: steps.check_files.outputs.files_exists == 'true'
with:
name: coverage-report
path: target/scala-2.12/scoverage-report
- name: Upload coverage report to Codacy
if: steps.check_files.outputs.files_exists == 'true'
run: sbt codacyCoverage
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}