-
Notifications
You must be signed in to change notification settings - Fork 38
117 lines (112 loc) · 3.27 KB
/
scala.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Scala CI
on:
push:
pull_request:
jobs:
sbt_formatChecks_dependencyTree:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Create sbt dependencyTree
env:
CI: true
run: |
sbt -Dsbt.log.format=false 'set asciiGraphWidth := 10000' 'dependencyTree'
- name: Verify scalafix passes
env:
CI: true
run: |
sbt -Dsbt.log.format=false generateRoutesFile scalafmtCheckAll scalafmtSbtCheck 'scalafixAll --check'
sbt_tests_jacoco:
runs-on: ubuntu-latest
services:
postgis11:
image: postgis/postgis:13-3.3
ports:
- 5432:5432
env:
POSTGRES_DB: mr_test
POSTGRES_USER: osm
POSTGRES_PASSWORD: osm
strategy:
matrix:
java: [ 11 ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Run sbt tests with jacoco analysis
env:
CI: true
MR_TEST_DB_NAME: "mr_test"
MR_TEST_DB_USER: "osm"
MR_TEST_DB_PASSWORD: "osm"
run: |
sbt -Dsbt.log.format=false jacoco
build:
runs-on: ubuntu-latest
services:
postgis11:
image: postgis/postgis:13-3.3
ports:
- 5432:5432
env:
POSTGRES_DB: mr_test
POSTGRES_USER: osm
POSTGRES_PASSWORD: osm
strategy:
matrix:
java: [11]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: 'osmlab/maproulette-java-client'
path: 'java-client'
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Run sbt compile
env:
CI: true
run: sbt -Dsbt.log.format=false compile
- name: Create the dev.conf
run: |
touch ./conf/dev.conf
echo 'include "application.conf"' >> ./conf/dev.conf
echo 'maproulette {' >> ./conf/dev.conf
echo ' debug=true' >> ./conf/dev.conf
echo ' bootstrap=true' >> ./conf/dev.conf
echo '}' >> ./conf/dev.conf
- name: Run maproulette and the maproulette-java-client integration tests
env:
# maproulette overrides
CI: true
SBT_OPTS: "-Xms512M -Xmx1024M -Xss2M -XX:MaxMetaspaceSize=1024M"
MR_SUPER_KEY: 1234
MR_DATABASE_URL: "jdbc:postgresql://localhost:5432/mr_test"
MR_DATABASE_USERNAME: "osm"
MR_DATABASE_PASSWORD: "osm"
# maproulette-java-client overrides
host: 127.0.0.1
scheme: http
apiKey: 1234
run: |
sbt -Dsbt.log.format=false -Dconfig.file=./conf/dev.conf run &
sleep 10
pushd java-client
./gradlew --info --project-prop runIntegrationTests \
clean integrationTest \
--tests '*BatchUploaderIntegrationTest*' \
--tests '*ChallengeAPIIntegrationTest*' \
--tests '*ProjectAPIIntegrationTest*'