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