Skip to content

Use lombok 1.18.32 to support Java 17 (#181) #286

Use lombok 1.18.32 to support Java 17 (#181)

Use lombok 1.18.32 to support Java 17 (#181) #286

Workflow file for this run

name: CI Build
on:
push:
jobs:
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:
# Jdk 17 requires gradle 7.3+ https://docs.gradle.org/current/userguide/compatibility.html
java: [11, 17]
steps:
- uses: actions/checkout@v4
with:
path: 'java-client'
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: 'maproulette/maproulette-backend'
path: 'maproulette-backend'
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'sbt'
- name: Build maproulette-java-client
run: |
pushd java-client
./gradlew --info build
# Publish the artifacts and pom to a local directory for later inspection
./gradlew --info publish
- name: Build maproulette-backend sbt
run: |
pushd maproulette-backend
sbt compile
- name: Create the maproulette-backend dev.conf
run: |
pushd maproulette-backend
touch ./conf/dev.conf
echo 'include "application.conf"' >> ./conf/dev.conf
echo 'play.http.secret.key = "GHACTION_9GcV9VDuy5JjYXBFldfD1Q+4/O8z2AAo3e9ID/tE9iM="' >> ./conf/dev.conf
echo 'db.default {' >> ./conf/dev.conf
echo ' url="jdbc:postgresql://localhost:5432/mr_test"' >> ./conf/dev.conf
echo ' username="osm"' >> ./conf/dev.conf
echo ' password="osm"' >> ./conf/dev.conf
echo '}' >> ./conf/dev.conf
echo 'maproulette {' >> ./conf/dev.conf
echo ' debug=true' >> ./conf/dev.conf
echo ' bootstrap=true' >> ./conf/dev.conf
echo ' super.key="1234"' >> ./conf/dev.conf
echo ' super.accounts=""' >> ./conf/dev.conf
echo '}' >> ./conf/dev.conf
- name: Run the integration tests
env:
SBT_OPTS: "-Xms512M -Xmx1024M -Xss2M -XX:MaxMetaspaceSize=1024M"
API_HOST: 127.0.0.1:9000
host: 127.0.0.1
scheme: http
apiKey: 1234
run: |
pushd maproulette-backend
sbt -Dconfig.file=./conf/dev.conf run &
sleep 15
popd
pushd java-client
./gradlew --info --project-prop runIntegrationTests \
integrationTest \
--tests '*BatchUploaderIntegrationTest*' \
--tests '*ChallengeAPIIntegrationTest*' \
--tests '*ProjectAPIIntegrationTest*' \
--tests '*TaskAPIIntegrationTest*'
validation:
name: "Gradle Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3