forked from http4s/http4s-jdk-http-client
40 lines (40 loc) · 1.23 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
name: CI
on: [push, pull_request]
jobs:
build:
name: Scala ${{ matrix.scala }}, Java ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [11]
scala: [2.12.10, 2.13.1]
env:
SCALA_VERSION: ${{ matrix.scala }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Get current week
run: |
echo "::set-env name=current_week::$(( $(date +%U) ))"
echo "::set-env name=last_week::$(( $(date +%U) - 1 ))"
- name: Cache SBT coursier cache
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: coursier-${{ env.current_week }}
restore-keys: coursier-${{ env.last_week }}
- name: Cache SBT
uses: actions/cache@v1
with:
path: ~/.sbt
key: sbt-${{ env.current_week }}
restore-keys: sbt-${{ env.last_week }}
- name: Tests
run: sbt ++$SCALA_VERSION test doc mimaReportBinaryIssues scalafmtCheckAll
- name: Test docs
# paradox requires 2.12
if: startsWith(matrix.scala, '2.12')
run: sbt ++$SCALA_VERSION docs/makeSite