This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
forked from yanana/agni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (46 loc) · 1.55 KB
/
.travis.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
language: scala
dist: xenial
sudo: false
scala:
- 2.12.11
- 2.13.2
jdk:
- openjdk11
- openjdk-ea
matrix:
allow_failures:
- jdk: openjdk-ea
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.sbt/launchers
- $HOME/.cache
install:
- pip install --user codecov
script:
- |
if [[ "$TRAVIS_JDK_VERSION" = "openjdk11" && "$TRAVIS_SCALA_VERSION" = 2.13.* ]]; then
sbt ++$TRAVIS_SCALA_VERSION clean coverage scalafmtCheckAll scalafmtSbtCheck compile test:compile test coverageReport coverageOff && codecov
else
sbt ++$TRAVIS_SCALA_VERSION clean compile test:compile test
fi
- |
if [[ "$TRAVIS_JDK_VERSION" = "openjdk11" && $(cat version.sbt) =~ "-SNAPSHOT" ]]; then
openssl aes-256-cbc -K $encrypted_4fb843316bad_key -iv $encrypted_4fb843316bad_iv -in .travis/secret-key.asc.enc -out .travis/secret-key.asc -d
echo "$PGP_PASSPHRASE" | gpg --passphrase-fd 0 --batch --yes --import .travis/secret-key.asc
if [ "$TRAVIS_BRANCH" = "master" ]; then
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
sbt ++$TRAVIS_SCALA_VERSION publishSigned
elif [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
sbt ++$TRAVIS_SCALA_VERSION publishLocalSigned
else
sbt ++$TRAVIS_SCALA_VERSION publishLocal
fi
fi
fi
after_script:
# See http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm