-
Notifications
You must be signed in to change notification settings - Fork 17
50 lines (42 loc) · 1.41 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# change in sync with gradle.properties
scala: [2.12.19, 2.13.14]
# see build.gradle copy template tasks
db: [MySQL, H2]
# Service containers to run with `container-job`
services:
mysql:
image: mysql:8.0.31
ports:
- 3307:3306
env:
# make sure to use something more secure in production
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: warp_core
influxdb:
image: influxdb:1.5.2
ports:
- 8086:8086
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Compile
run: ./gradlew clean compileTestScala -PscalaVersion=${{ matrix.scala }}
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ matrix.scala }}-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-${{ matrix.scala }}
- name: Build with Gradle
run: ./gradlew copy${{ matrix.db }}ConfigTemplate :warp-core:checkScoverage aggregateScoverage checkScalafix publishToMavenLocal -PscalaVersion=${{ matrix.scala }} -PshowTestStandardStreams=true --stacktrace