Skip to content

CI1

CI1 #1179

Workflow file for this run

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"