-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (47 loc) · 1.2 KB
/
ci.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
---
name: CI
on:
pull_request:
push:
branches: [master]
jobs:
test:
strategy:
fail-fast: false
matrix:
java:
- "adopt@1.8"
- "openjdk@1.11"
- "openjdk@1.17"
scala:
- 2.12.18
- 2.13.11
- 3.3.1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: olafurpg/setup-scala@v11
with:
java-version: "${{ matrix.java }}"
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Build and test
run: sbt ++${{ matrix.scala }} scalafmtCheckAll scalafmtSbtCheck headerCheck test:headerCheck coverage test coverageReport
shell: bash
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/scala@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true