-
Notifications
You must be signed in to change notification settings - Fork 15
77 lines (77 loc) · 1.97 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
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
---
name: CI
on:
pull_request:
push:
branches: [master]
schedule:
- cron: '0 0 * * 0'
jobs:
test:
strategy:
fail-fast: false
matrix:
java:
scala:
- 2.12.17
- 2.13.10
- 3.2.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 }} scalafmtCheck test:scalafmtCheck scalafmtSbtCheck headerCheck test:headerCheck test
shell: bash
timeout-minutes: 10
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/scala@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
e2e:
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scala:
- 2.13.10
- 3.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
uses: olafurpg/setup-scala@v10
with:
java-version: "[email protected]"
- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Build and test
env:
FAPI_API_KEY: ${{ secrets.FAPI_API_KEY }}
FAPI_SECRET_KEY: ${{ secrets.FAPI_SECRET_KEY }}
SPOT_API_KEY: ${{ secrets.SPOT_API_KEY }}
SPOT_SECRET_KEY: ${{ secrets.SPOT_SECRET_KEY }}
run: sbt ++${{ matrix.scala }} e2e:test
shell: bash
timeout-minutes: 10