forked from lemonlabsuk/scala-uri
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 1.92 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: scala-uri CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
scala: [2.12.19, 2.13.13]
project: [scalaUriJVM, scalaUriJS]
coverage: [coverage]
coverageReport: [coverageReport]
include:
# https://github.com/scoverage/scalac-scoverage-plugin/issues/299
- scala: 3.3.3
project: scalaUriJVM
coverage: ""
coverageReport: ""
- scala: 3.3.3
project: scalaUriJS
coverage: ""
coverageReport: ""
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Cache node modules
uses: actions/cache@v4
with:
key: scala-dependencies
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '14' # nodejs < 10 fails finding URL class
- name: Run tests
env:
SCALA_VERSION: ${{ matrix.scala }}
PROJECT: ${{ matrix.project }}
COVERAGE: ${{ matrix.coverage }}
COVERAGE_REPORT: ${{ matrix.coverageReport }}
SBT_OPTS: -Xss10m
run: >
sbt ++$SCALA_VERSION check mdoc $COVERAGE $PROJECT/test $COVERAGE_REPORT &&
cd target &&
git clone https://github.com/lemonlabsuk/scala-uri-demo.git &&
cd scala-uri-demo &&
echo "1.9.7" > './project/build.properties' &&
sbt -Dscala.ver=$SCALA_VERSION -Dscala.uri.ver=4.0.3 test &&
cd "$TRAVIS_BUILD_DIR"
- name: Report to CodeCov
run: bash <(curl -s https://codecov.io/bash)