API Challenges is a self-teaching API practice application.
This repository contains the runnable API Challenges application and its automated acceptance test suite:
challengerbuilds the deployableapichallenges.jarchallengerAutoruns the API-level challenge regression suite
Thingifier remains in the separate
eviltester/thingifier repository.
Until Thingifier is published as a normal Maven artifact, CI checks out
Thingifier and installs its library artifacts into the Maven cache before
building this repository.
Install Thingifier locally first:
git clone https://github.com/eviltester/thingifier.git ../thingifier
mvn -B -f ../thingifier/pom.xml -pl ercoremodel,thingifier -am install \
-DskipTests \
-Dspotless.check.skip=true \
-Dcheckstyle.skip=true \
-Dpmd.skip=trueThen build API Challenges:
mvn -B clean test
mvn -B -pl challenger -am packageThe deployable app is:
challenger/target/apichallenges.jar
Run it with:
java -jar challenger/target/apichallenges.jarThen visit:
- http://localhost:4567
- http://localhost:4567/challenges
- http://localhost:4567/docs
- http://localhost:4567/docs/swagger-ui
Run the full local regression suite:
mvn -B -pl challengerAuto -am testRun specific repository modes:
mvn -B -pl challengerAuto -am test \
-Dchallenger.auto.target=local \
-Dchallenger.auto.local.repository=memory \
-Dchallenger.auto.local.playerMode=multi
mvn -B -pl challengerAuto -am test \
-Dchallenger.auto.target=local \
-Dchallenger.auto.local.repository=sqlite-memory \
-Dchallenger.auto.local.playerMode=multiBuild the jar first, then build the image:
mvn -B -pl challenger -am package
docker build -t eviltester/apichallenges -f docker/apichallenges/Dockerfile .Run the image:
docker run --rm -p 4567:4567 eviltester/apichallengesThe GitHub Actions Docker workflow builds and smoke-tests the image. On master,
main, and version tags it can push to Docker Hub when DOCKERHUB_USERNAME and
DOCKERHUB_TOKEN repository secrets are configured.
Java source formatting is enforced with Spotless and google-java-format using the AOSP four-space style.
Check formatting:
mvn spotless:checkApply formatting:
mvn spotless:apply