Skip to content

Weekly Builds

Weekly Builds #967

Workflow file for this run

name: Nightly Builds
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
compile-and-test:
name: Compile and test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.13, 3.3]
JDK_VERSION: ["1.11", "1.17", "1.21"]
include:
- JDK_VERSION: 1.11
JVM_NAME: temurin:1.11
extraOpts: ''
- JDK_VERSION: 1.17
JVM_NAME: temurin:1.17
extraOpts: ''
- JDK_VERSION: 1.21
JVM_NAME: temurin:1.21.0.2
extraOpts: ''
AKKA_VERSION: [main, default, snapshot]
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
# v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Cache Coursier cache
# https://github.com/coursier/cache-action/releases
# v6.4.5
uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d
- name: Set up JDK ${{ matrix.JDK_VERSION }}
# https://github.com/coursier/setup-action/releases
# v1.3.5
uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f
with:
jvm: ${{ matrix.JVM_NAME }}
- name: Cache Build Target
uses: actions/cache@v3.0.11
with:
path: project/**/target
key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
- name: Compile everything
run: |-
sbt \
-Dakka.http.build.akka.version=${{ matrix.AKKA_VERSION }} ++${{ matrix.SCALA_VERSION }} \
mimaReportBinaryIssues Test/compile ${{ matrix.extraOpts }}
- name: Run all tests JDK ${{ matrix.JDK_VERSION }}, Scala ${{ matrix.SCALA_VERSION }}, Akka ${{ matrix.AKKA_VERSION }}
run: |-
sbt -Dakka.http.parallelExecution=false -Dakka.test.timefactor=2 \
-Dakka.http.build.akka.version=${{ matrix.AKKA_VERSION }} ++${{ matrix.SCALA_VERSION }} \
test ${{ matrix.extraOpts }}
- name: Upload test results
uses: actions/upload-artifact@v3.1.1
if: success() || failure() # run this step even if previous step failed
with:
name: 'test-results-${{ matrix.JDK_VERSION }}-${{ matrix.SCALA_VERSION }}-${{ matrix.AKKA_VERSION }}'
path: '**/target/test-reports/*.xml'
- name: Email on failure
if: ${{ failure() }}
# https://github.com/dawidd6/action-send-mail/releases/tag/v3.7.1
uses: dawidd6/action-send-mail@6063705cefe50cb915fc53bb06d4049cae2953b2
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: "Failed: ${{ github.workflow }} / ${{ github.job }}"
to: ${{secrets.MAIL_SEND_TO}}
from: Akka HTTP CI
body: |
Job ${{ github.job }} in workflow ${{ github.workflow }} of ${{github.repository}} failed!
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}