Merge pull request #221 from lerna-stack/release/v2.3.1 #1048
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: CI | |
on: | |
push: | |
branches: [ master, feature/** ] | |
pull_request: | |
branches: [ master, feature/** ] | |
env: | |
# classic timefactor doesn't affect classic default-timeout | |
SBT_OPTS: >- | |
-Dlerna.enable.discipline | |
-Dakka.test.timefactor=3.0 | |
-Dakka.actor.testkit.typed.timefactor=3.0 | |
-Dakka.test.default-timeout=15s | |
-Dakka.testconductor.barrier-timeout=90s | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test (Java ${{ matrix.java }}) | |
strategy: | |
matrix: | |
java: [ '8', '11' ] | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# sbt-dynver (used by sbt-ci-release) detects the previous version by tag: | |
# https://github.com/dwijnand/sbt-dynver/tree/v4.1.1#previous-version-detection | |
fetch-depth: 0 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html#Caching | |
- name: Coursier cache | |
uses: coursier/cache-action@v5 | |
- name: Check code format | |
run: sbt scalafmtCheckAll | |
# Detect compilation errors early | |
- name: Compile | |
run: sbt clean compile test:compile multi-jvm:compile | |
- name: Check binary compartibility | |
run: sbt --batch mimaReportBinaryIssues | |
- name: Run tests | |
run: sbt coverage test | |
- name: Run integration tests | |
run: sh ./scripts/run-multijvm-test.sh 1 | |
- name: Publish test report | |
uses: mikepenz/action-junit-report@v2 | |
if: ${{ always() }} | |
with: | |
check_name: ScalaTest Report (Java ${{ matrix.java }}) | |
report_paths: '**/target/**test-reports/TEST-*.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check the test coverage is above the minimum criteria | |
run: sbt coverageReport | |
# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html#Caching | |
- name: Clean files for caching | |
run: | | |
rm -rf "$HOME/.ivy2/local" || true | |
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | |
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.sbt -name "*.lock" -delete || true |