Skip to content

Commit 949cb21

Browse files
committed
Travis setup for releasing
1 parent 70fabcf commit 949cb21

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

.travis.yml

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,41 @@
1-
language: scala
21
dist: trusty
3-
2+
language: scala
43
jdk: openjdk11
5-
64
scala:
75
- 2.13.1
86

7+
stages:
8+
- test
9+
- name: release
10+
if: tag =~ ^v
11+
912
before_script:
10-
- "export DISPLAY=:99.0"
11-
- "sh -e /etc/init.d/xvfb start"
12-
- sleep 3 # give xvfb some time to start
13-
# Instal google-chrome
14-
- export CHROME_BIN=/usr/bin/google-chrome
15-
- sudo apt-get update
16-
- sudo apt-get install -y libappindicator1 fonts-liberation
17-
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
18-
- sudo dpkg -i google-chrome*.deb
19-
# Install Selenium chromedriver
20-
- wget http://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
21-
- unzip chromedriver_linux64.zip -d selenium-bin
22-
- export PATH=$PWD/selenium-bin:$PATH
13+
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
14+
- mkdir geckodriver
15+
- tar -xzf geckodriver-v0.24.0-linux64.tar.gz -C geckodriver
16+
- export PATH=$PWD/geckodriver:$PATH
2317

2418
script:
2519
- sbt +test +publishLocal
26-
- cd example && sbt compileStatics
20+
- cd example && sbt compileStatics
21+
22+
jobs:
23+
include:
24+
- stage: release
25+
script:
26+
- openssl aes-256-cbc -K $encrypted_f00a6d0a0202_key -iv $encrypted_f00a6d0a0202_iv -in travis/travis.gpg.enc -out travis/travis.gpg -d
27+
- gpg --import travis/travis.gpg
28+
- test $TRAVIS_PULL_REQUEST = "false" && sbt +publishSigned sonatypeBundleRelease
29+
30+
before_cache:
31+
# Cleanup the cached directories to avoid unnecessary cache updates
32+
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
33+
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
34+
- find $HOME/.sbt -name "*.lock" -print -delete
35+
36+
cache:
37+
directories:
38+
- $HOME/.ivy2/cache
39+
- $HOME/.m2
40+
- $HOME/.cache
41+
- $HOME/.sbt

travis.gpg.enc

3.63 KB
Binary file not shown.

0 commit comments

Comments
 (0)