7 name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
10 ubuntu: [18.04, 20.04]
12 runs-on: ubuntu-${{ matrix.ubuntu }}
15 OPENSTREETMAP_MEMCACHE_SERVERS: 127.0.0.1
17 - name: Checkout source
18 uses: actions/checkout@v2.3.5
20 uses: actions/setup-ruby@v1.1.3
22 ruby-version: ${{ matrix.ruby }}
24 uses: actions/cache@v2.1.6
27 key: bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-${{ hashFiles('Gemfile.lock') }}
29 bundle-ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}-
30 - name: Cache node modules
31 uses: actions/cache@v2.1.6
34 key: yarn-ubuntu-${{ matrix.ubuntu }}-${{ hashFiles('yarn.lock') }}
36 yarn-ubuntu-${{ matrix.ubuntu }}-
37 - name: Install packages
39 sudo apt-get -yqq update
40 sudo apt-get -yqq install memcached
44 bundle config set deployment true
45 bundle install --jobs 4 --retry 3
46 - name: Create database
48 sudo systemctl start postgresql
49 sudo -u postgres createuser -s $(id -un)
50 createdb openstreetmap
51 psql -c "CREATE EXTENSION btree_gist" openstreetmap
52 psql -f db/functions/functions.sql openstreetmap
53 - name: Configure rails
55 cp config/github.database.yml config/database.yml
56 cp config/example.storage.yml config/storage.yml
57 touch config/settings.local.yml
58 - name: Populate database
60 sed -f script/normalise-structure db/structure.sql > db/structure.expected
61 bundle exec rake db:migrate
62 sed -f script/normalise-structure db/structure.sql > db/structure.actual
63 diff -uw db/structure.expected db/structure.actual
64 - name: Export javascript strings
65 run: bundle exec rake i18n:js:export
66 - name: Install node modules
67 run: bundle exec rake yarn:install
69 run: bundle exec rails test:all
70 - name: Report completion to Coveralls
71 uses: coverallsapp/github-action@1.1.3
73 github-token: ${{ secrets.github_token }}
74 flag-name: ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}
79 runs-on: ubuntu-latest
81 - name: Report completion to Coveralls
82 uses: coverallsapp/github-action@1.1.3
84 github-token: ${{ secrets.github_token }}
85 parallel-finished: true