Skip to content

add users.avatar_url constraint and default (#1141) #1123

add users.avatar_url constraint and default (#1141)

add users.avatar_url constraint and default (#1141) #1123

Workflow file for this run

name: MapRoulette Backend CI
on:
push:
pull_request:
jobs:
generate_app_secret:
runs-on: ubuntu-latest
outputs:
application_secret: ${{ steps.generate_app_secret.outputs.application_app_secret }}
steps:
- name: Generate Playframework APPLICATION_SECRET
id: generate_app_secret
run: echo "application_app_secret=$(openssl rand -base64 32)" >> "$GITHUB_OUTPUT"
sbt_formatChecks_dependencyTree:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: sbt
- name: Create sbt dependencyTree
env:
CI: true
run: |
sbt -Dsbt.log.format=false 'set asciiGraphWidth := 10000' 'dependencyTree' 'evicted'
- name: Verify code format checks pass
env:
CI: true
run: |
sbt -Dsbt.log.format=false generateRoutesFile scalafmtCheckAll scalafmtSbtCheck 'scalafixAll --check'
sbt_tests_jacoco:
runs-on: ubuntu-latest
needs: generate_app_secret
services:
postgis:
image: postgis/postgis:16-3.4
ports:
- 5432:5432
env:
POSTGRES_DB: mr_test
POSTGRES_USER: osm
POSTGRES_PASSWORD: osm
strategy:
matrix:
java: [ 11, 17 ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: sbt
- name: Run sbt tests with jacoco analysis
env:
APPLICATION_SECRET: ${{ needs.generate_app_secret.outputs.application_secret }}
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
needs: generate_app_secret
services:
postgis:
image: postgis/postgis:13-3.3
ports:
- 5432:5432
env:
POSTGRES_DB: mr_test
POSTGRES_USER: osm
POSTGRES_PASSWORD: osm
strategy:
matrix:
java: [17]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: 'osmlab/maproulette-java-client'
path: 'java-client'
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
# https://github.com/actions/setup-java?tab=readme-ov-file#install-multiple-jdks
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: sbt
- 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
APPLICATION_SECRET: ${{ needs.generate_app_secret.outputs.application_secret }}
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*'