-
Notifications
You must be signed in to change notification settings - Fork 35
51 lines (50 loc) · 1.63 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
name: CI1
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 2 * * *'
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- java: 8
sbt: "1.2.8"
- java: 11
sbt: "1.2.8"
- java: 11
sbt: "1.7.3"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Setup Scala
uses: coursier/setup-action@v1
with:
jvm: "adopt:${{ matrix.java }}"
- name: Publish Local
run: sbt -v -Dfile.encoding=UTF-8 "^ publishLocal"
- name: Get plugin version
run: |
PLUGIN_VERSION=$(sbt -Dsbt.ci=true -Dsbt.supershell=false -Dsbt.color=false -Dsbt.log.noformat=true -error "print version")
echo ${PLUGIN_VERSION}
echo "PLUGIN_VERSION=${PLUGIN_VERSION}" >> $GITHUB_ENV
- name: Test example project for current snapshot
run: |
echo "sbt.version=${{ matrix.sbt }}" > ./project/build.properties
sbt -v -Dfile.encoding=UTF-8 -Dplugin.version="${{ env.PLUGIN_VERSION }}" version
working-directory: ./testProject
- name: Build and Test
run: sbt -v -Dfile.encoding=UTF-8 "^^ ${{ matrix.sbt }}" clean test scripted
- name: DependencyCheck
run: sbt -v -Dfile.encoding=UTF-8 "^^ ${{ matrix.sbt }}" dependencyCheck
- name: Print DependencyCheck Result
uses: albuch/[email protected]
with:
jsonReportPath: "target/scala-2.12/sbt-1.0/dependency-check-report.json"