-
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (67 loc) · 1.85 KB
/
continouos-integration.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
# Continuous Integration (CI) to Build & Test & Coverage & Lint.
# ~~
name: CI
on:
pull_request:
branches: [ '**' ]
push:
branches: [ '**' ]
jobs:
validate:
name: Validate Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: '11'
cache: 'sbt'
- name: Validate Code
run: sbt validateCode
build:
name: Build & Test
needs: [ validate ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: '11'
cache: 'sbt'
- name: Build & Test
run: sbt testWithCoverage
- name: Upload coverage report (Cobertura)
uses: actions/[email protected]
with:
name: cobertura.xml
path: ${{github.workspace}}/target/scala-2.13/coverage-report/cobertura.xml
- name: Upload coverage report (HTML)
uses: actions/[email protected]
with:
name: scoverage-report-html
path: ${{github.workspace}}/target/scala-2.13/scoverage-report/
coverage:
name: Coverage Report
if: ${{ github.event.pull_request }}
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: cobertura.xml
- name: Analyzing coverage report
uses: 5monkeys/cobertura-action@master
with:
path: cobertura.xml
only_changed_files: true
fail_below_threshold: true
show_missing: true
show_line: true
show_branch: true
show_class_names: true
link_missing_lines: true
minimum_coverage: 75