6 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
7 cancel-in-progress: true
10 name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
13 ubuntu: [22.04, 24.04]
14 ruby: ['3.1', '3.2', '3.3', '3.4']
15 runs-on: ubuntu-${{ matrix.ubuntu }}
18 OPENSTREETMAP_MEMCACHE_SERVERS: 127.0.0.1
20 - name: Checkout source
21 uses: actions/checkout@v4
23 uses: ruby/setup-ruby@v1
25 ruby-version: ${{ matrix.ruby }}
28 - name: Cache node modules
29 uses: actions/setup-node@v4
32 - name: Install packages
34 sudo apt-get -yqq update
35 sudo apt-get -yqq install memcached libvips-dev
36 - name: Create database
38 sudo systemctl start postgresql
39 sudo -u postgres createuser -s $(id -un)
40 createdb openstreetmap
41 - name: Configure rails
43 cp config/github.database.yml config/database.yml
44 cp config/example.storage.yml config/storage.yml
45 touch config/settings.local.yml
46 - name: Populate database
48 sed -f script/normalise-structure db/structure.sql > db/structure.expected
49 bundle exec rails db:migrate
50 sed -f script/normalise-structure db/structure.sql > db/structure.actual
51 diff -uw db/structure.expected db/structure.actual
52 - name: Export javascript strings
53 run: bundle exec rails i18n:js:export
54 - name: Install node modules
55 run: bundle exec bin/yarn install
56 - name: Compile assets
57 run: bundle exec rails assets:precompile
58 - name: Create tmp/pids directory
59 run: mkdir -p tmp/pids
61 run: bundle exec rails test:all
62 - name: Run javascript tests
63 run: bundle exec teaspoon
64 - name: Report completion to Coveralls
65 uses: coverallsapp/github-action@v2.3.6
67 github-token: ${{ secrets.github_token }}
68 flag-name: ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}
74 runs-on: ubuntu-latest
76 - name: Report completion to Coveralls
77 uses: coverallsapp/github-action@v2.3.6
79 github-token: ${{ secrets.github_token }}
80 parallel-finished: true