-
Notifications
You must be signed in to change notification settings - Fork 595
85 lines (74 loc) · 2.84 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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/[email protected]
with:
fetch-depth: 0
- name: Cache Coursier cache
uses: coursier/[email protected]
- name: Set up JDK ${{ matrix.JDK_VERSION }}
uses: coursier/[email protected]
with:
jvm: ${{ matrix.JVM_NAME }}
- name: Cache Build Target
uses: actions/[email protected]
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/[email protected]
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}}