]> git.openstreetmap.org Git - rails.git/blob - .github/workflows/docker.yml
Prevent node_modules from mounting to save rake yarn:install step
[rails.git] / .github / workflows / docker.yml
1 name: Docker
2 on:
3   - push
4   - pull_request
5 jobs:
6   test:
7     name: Docker
8     runs-on: ubuntu-20.04
9     steps:
10     - name: Checkout source
11       uses: actions/checkout@v1
12     - name: Poke config
13       run: |
14         cp config/example.storage.yml config/storage.yml
15         cp config/docker.database.yml config/database.yml
16         touch config/settings.local.yml
17     - name: Build Docker Image
18       run: |
19         docker-compose build
20     - name: Start Docker-Compose
21       run: |
22         docker-compose up -d
23         sleep 15 # let the DB warm up a little
24     - name: Prepare Database
25       run: |
26         docker-compose run --rm web rake db:migrate
27         docker-compose run --rm web osmosis --rx docker/null-island.osm.xml --wd host=db database=openstreetmap user=openstreetmap password=openstreetmap validateSchemaVersion=no
28     - name: Test Basic Website
29       run: |
30         curl -siL http://127.0.0.1:3000 | egrep '^HTTP/1.1 200 OK'
31         curl -siL http://127.0.0.1:3000 | grep 'OpenStreetMap is the free wiki world map'
32         curl -siL http://127.0.0.1:3000/api/0.6/node/1 | grep 'Null Island'