-
Notifications
You must be signed in to change notification settings - Fork 29
54 lines (50 loc) · 1.63 KB
/
main.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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Docker login
uses: azure/docker-login@v1
with:
login-server: 'docker.pkg.github.com'
username: ${GITHUB_ACTOR}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v1
with:
path: ~/.ivy2
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-ivy2-
- name: Start dockerized services
run: ./services.sh start
- name: Wait Druid to become available
run: wget localhost:8082/status
- name: Build for Scala 2.11
run: sbt ++2.11.12 compile test:compile
- name: Build for Scala 2.12
run: sbt ++2.12.11 compile test:compile
- name: Build for Scala 2.13
run: sbt ++2.13.2 compile test:compile
- name: Code coverage report (Scala 2.13)
run: sbt coverage test coverageReport
- name: Archive code coverage report (Scala 2.13)
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: target/scala-2.13/scoverage-report
- name: Shutdown dockerized services
run: ./services.sh down
- name: Push docker images
if: github.event_name != 'pull_request'
run: (cd docker; make push)
env:
_JAVA_OPTIONS: "-Xms512m -Xmx4g"
REPOSITORY_OWNER: ${{ github.repository }}