-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1022 Bytes
/
unit-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
name: "Build and unit tests"
on:
push:
tags:
- "**"
branches:
- main
pull_request:
env:
JAVA_VERSION: [email protected]
SCALA_VERSION: "2.13"
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
jobs:
build-and-test:
name: "Unit tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Scala
uses: olafurpg/setup-scala@v11
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Check formatting
run: sbt scalafmtCheckAll
- name: Compile and test
run: sbt coverage test
- name: Generate code coverage reports
if: always()
run: sbt coverageReport coverageAggregate
- name: Publish Backend Unit Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: "target/test-reports/**/TEST-*.xml"
check_run_annotations_branch: "*"