Skip to content

CI

CI #3332

Workflow file for this run

name: CI
on:
pull_request:
push:
schedule:
- cron: '0 7 * * *'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
scala: [2, 3]
project: [rootJVM, rootJS, rootNative]
java: [8]
include:
- java: 11
scala: 2
project: rootJVM
- java: 21
scala: 2
project: rootJVM
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: ${{matrix.java}}
distribution: adopt
- uses: coursier/cache-action@v6
- run: ./sbt -v
-Dcheck_build_file_imports
checkGenTypeClasses
$(if [[ "${{ matrix.scala }}" == "3" ]]; then echo SetScala3; fi)
"project ${{ matrix.project }}"
Test/compile
$(if [[ "${ matrix.project }}" == "rootJS" ]]; then echo "Test/fastOptJS"; fi)
- run: ./sbt -v
$(if [[ "${{ matrix.scala }}" == "3" ]]; then echo SetScala3; fi)
"project ${{ matrix.project }}"
test
"project /"
$(if [[ "${{ matrix.project }}" == "rootJVM" ]]; then echo "publishLocal"; fi)
- run: |
case ${{ matrix.project }} in
"rootJVM")
./sbt -v \
$(if [[ "${{ matrix.scala }}" == "3" ]]; then echo SetScala3; fi) \
"project exampleJVM" \
runAllMain
;;
"rootJS")
./sbt -v \
$(if [[ "${{ matrix.scala }}" == "3" ]]; then echo SetScala3; fi) \
"project exampleJS" \
runAllMain
;;
"rootNative")
./sbt -v \
$(if [[ "${{ matrix.scala }}" == "3" ]]; then echo SetScala3; fi) \
"project exampleNative" \
runAllMain
;;
*)
echo "unknown project"
exit 1
esac
- uses: mikepenz/action-junit-report@9379f0ccddcab154835d4e2487555ee79614fe95 # v4.2.1
if: always()
with:
report_paths: '**/target/test-reports/*.xml'
require_tests: true
check_name: "${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}"
- uses: test-summary/action@v2
if: always()
with:
paths: '**/target/test-reports/*.xml'
- run: rm -rf "$HOME/.ivy2/local" || true