modify bulk task status update into a build flow (#971) #668
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scala CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
sbt_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' 'scalafixAll --check' | |
sbt_tests_jacoco: | |
runs-on: ubuntu-latest | |
services: | |
postgis11: | |
image: postgis/postgis:11-2.5 | |
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:11-2.5 | |
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@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
- name: Run sbt compile | |
env: | |
CI: true | |
run: sbt -Dsbt.log.format=false scalafmtCheckAll compile | |
- name: Create the dev.conf | |
run: | | |
touch ./conf/dev.conf | |
echo 'include "application.conf"' >> ./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 maproulette-java-client integration tests | |
env: | |
CI: true | |
SBT_OPTS: "-Xms512M -Xmx1024M -Xss2M -XX:MaxMetaspaceSize=1024M" | |
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*' |