Bump actions/cache from 1 to 4 #542
Workflow file for this run
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: PR checks | |
on: | |
pull_request: | |
jobs: | |
test: | |
name: Test using JDK ${{matrix.java}} and Scala ${{matrix.scala}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [8, 11] | |
scala: | |
- 2.12.17 | |
- 2.12.18 | |
- 2.13.11 | |
- 2.13.12 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: olafurpg/setup-scala@v14 | |
with: | |
java-version: adopt@1.${{matrix.java}} | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.ivy2/cache | |
key: ivy-${{hashFiles('**/*.sbt')}}-${{matrix.scala}} | |
restore-keys: ivy- | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.sbt | |
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}}-${{matrix.scala}} | |
restore-keys: sbt- | |
- run: sbt ++${{matrix.scala}}! test | |
additional-checks: | |
name: Run additional checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: olafurpg/setup-scala@v14 | |
with: | |
java-version: [email protected] | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.ivy2/cache | |
key: ivy-${{hashFiles('**/*.sbt')}} | |
restore-keys: ivy- | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.sbt | |
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}} | |
restore-keys: sbt- | |
- name: Generate coverage report | |
run: sbt clean coverage test coverageReport | |
- uses: codecov/codecov-action@v1 | |
- name: Run Scalafix check | |
run: sbt fixCheck | |
- name: Run Scapegoat | |
run: | | |
sbt 'set version := "99.0-SNAPSHOT"; publishLocal' | |
sbt -Dadd-scapegoat-plugin=true 'set name := "scapegoat-test"; set scapegoatVersion in ThisBuild := "99.0-SNAPSHOT"; scapegoat' |