CI1 #1136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |