Skip to content

Weekly Builds

Weekly Builds #576

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.12, 2.13, 3.2]
JDK_VERSION: ["1.8", "1.11", "1.17"]
include:
- JDK_VERSION: 1.8
JVM_NAME: temurin:1.8
extraOpts: '-J-Xmx2048m'
- JDK_VERSION: 1.11
JVM_NAME: temurin:1.11
extraOpts: ''
- JDK_VERSION: 1.17
JVM_NAME: temurin:1.17
extraOpts: ''
AKKA_VERSION: [main, default]
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Cache Coursier cache
uses: coursier/cache-action@v6.4.0
- name: Set up JDK ${{ matrix.JDK_VERSION }}
uses: coursier/setup-action@v1.3.0
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}}