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