8 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
9 cancel-in-progress: true
13 runs-on: ubuntu-latest
16 - name: Checkout source
17 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20 cp config/example.storage.yml config/storage.yml
21 cp config/docker.database.yml config/database.yml
22 touch config/settings.local.yml
23 - name: Build Docker Image
26 - name: Start Docker Compose
29 sleep 15 # let the DB warm up a little
30 - name: Prepare Database
32 docker compose run --rm web bundle exec rails db:migrate
33 docker compose run --rm web bundle exec i18n export
34 docker compose run --rm web bundle exec rails assets:precompile
35 docker compose run --rm web osmosis --rx docker/null-island.osm.xml --wd host=db database=openstreetmap user=openstreetmap password=openstreetmap validateSchemaVersion=no
36 - name: Test Basic Website
38 curl -siL http://127.0.0.1:3000 | egrep '^HTTP/1.1 200 OK'
39 curl -siL http://127.0.0.1:3000 | grep 'OpenStreetMap is a map of the world'
40 curl -siL http://127.0.0.1:3000/api/0.6/node/1 | grep 'Null Island'
41 - name: Test Complete Suite
43 docker compose run --rm web bundle exec rails db:test:prepare
44 docker compose run --rm web bundle exec rails test:all