Skip to content

Commit 80afc1b

Browse files
authored
build: replace travis with github actions (#290)
1 parent 3c7369b commit 80afc1b

File tree

2 files changed

+101
-125
lines changed

2 files changed

+101
-125
lines changed

.github/workflows/validate.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Test and publish
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
tags: [ v* ]
8+
9+
jobs:
10+
compile-and-test:
11+
name: Compile and test and publish
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
scala-version:
17+
- 2.11.6
18+
- 2.11.7
19+
- 2.11.8
20+
- 2.11.11
21+
- 2.11.12
22+
- 2.12.3
23+
- 2.12.4
24+
- 2.12.5
25+
- 2.12.6
26+
- 2.12.7
27+
- 2.12.8
28+
- 2.12.9
29+
- 2.12.10
30+
- 2.12.11
31+
- 2.12.12
32+
- 2.12.13
33+
- 2.12.14
34+
- 2.13.0
35+
- 2.13.1
36+
- 2.13.2
37+
- 2.13.3
38+
- 2.13.4
39+
- 2.13.5
40+
- 2.13.6
41+
jdk-version: [1.8, 1.11]
42+
# some old scala versions don't support JDK 11
43+
exclude:
44+
- scala-version: 2.11.6
45+
jdk-version: 1.11
46+
- scala-version: 2.11.7
47+
jdk-version: 1.11
48+
- scala-version: 2.11.8
49+
jdk-version: 1.11
50+
- scala-version: 2.11.11
51+
jdk-version: 1.11
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
with:
57+
fetch-depth: 0
58+
59+
- name: Checkout GitHub merge
60+
if: github.event.pull_request
61+
run: |-
62+
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
63+
git checkout scratch
64+
65+
- name: Set up JDK ${{ matrix.jdk-version }}
66+
uses: olafurpg/setup-scala@v10
67+
with:
68+
java-version: adopt@${{ matrix.jdk-version }}
69+
70+
- name: Cache Coursier cache
71+
uses: coursier/cache-action@v5
72+
73+
- name: Compile and test for JDK ${{ matrix.jdk-version }}, Scala ${{ matrix.scala-version }}
74+
run: sbt -J-XX:ReservedCodeCacheSize=256M ++${{ matrix.scala-version }} test
75+
76+
publish:
77+
name: Publish to Maven Central
78+
if: startsWith(github.ref, 'refs/tags/v')
79+
needs: [ compile-and-test ]
80+
runs-on: ubuntu-latest
81+
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v2
85+
with:
86+
fetch-depth: 0
87+
88+
- name: Set up JDK 8
89+
uses: olafurpg/setup-scala@v10
90+
with:
91+
java-version: [email protected]
92+
93+
- name: Cache Coursier cache
94+
uses: coursier/cache-action@v5
95+
96+
- name: Publish
97+
run: sbt ci-release
98+
env:
99+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
100+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
101+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

.travis.yml

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)