-
Notifications
You must be signed in to change notification settings - Fork 410
64 lines (61 loc) · 1.7 KB
/
continuous-integration.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
name: continuous integration
env:
JAVA_OPTS: "-Dsbt.log.noformat=true"
TRAVIS: "true" # pretend we're TravisCI
SBT_VERSION: 1.7.1
BUILD_VERSION: "v1" # bump this if builds are failing due to a bad cache
defaults:
run:
shell: bash
on:
push:
branches:
- develop
- release
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
scala: [2.12.12, 2.13.6]
java: ['1.8', '1.11']
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: echo java version
run: java -Xmx32m -version
- name: echo javac version
run: javac -J-Xmx32m -version
- name: cache build dependencies
uses: actions/cache@v2
env:
cache-name: cache-build-deps
with:
path: |
~/.dodo
~/.ivy2/cache
~/.ivy2/local/com.twitter
~/.sbt
key: ${{ runner.os }}-build-${{ env.BUILD_VERSION }}-${{ env.cache-name }}-${{ env.SBT_VERSION }}-${{ matrix.scala }}-${{ matrix.java }}
- name: update cache
run: |
if [ -f ~/.ivy2/cache ]; then
find ~/.ivy2/cache -name "ivydata-*.properties" -delete
fi
if [ -f ~/.sbt ]; then
find ~/.sbt -name "*.lock" -delete
fi
- name: build dependencies
uses: twitter/dodo-build@v3
with:
branch: develop
project: finatra
no-test: true
publish-m2: true
verbose: true
- name: test
run: ${{ format('./sbt ++{0} clean test', matrix.scala) }}