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.4
20 uses: actions/setup-ruby@v1
22 ruby-version: ${{ matrix.ruby }}
24 uses: actions/cache@v2.1.4
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.4
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 -f db/functions/functions.sql openstreetmap
52 - name: Configure rails
54 cp config/github.database.yml config/database.yml
55 cp config/example.storage.yml config/storage.yml
56 touch config/settings.local.yml
57 - name: Populate database
59 sed -f script/normalise-structure db/structure.sql > db/structure.expected
60 bundle exec rake db:migrate
61 sed -f script/normalise-structure db/structure.sql > db/structure.actual
62 diff -uw db/structure.expected db/structure.actual
63 - name: Export javascript strings
64 run: bundle exec rake i18n:js:export
65 - name: Install node modules
66 run: bundle exec rake yarn:install
68 run: bundle exec rake test:db
69 - name: Report completion to Coveralls
70 uses: coverallsapp/github-action@v1.1.2
72 github-token: ${{ secrets.github_token }}
73 flag-name: ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}
78 runs-on: ubuntu-latest
80 - name: Report completion to Coveralls
81 uses: coverallsapp/github-action@v1.1.2
83 github-token: ${{ secrets.github_token }}
84 parallel-finished: true