6 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
7 cancel-in-progress: true
10 name: Ruby ${{ matrix.ruby }}
13 ruby: ['3.2', '3.3', '3.4']
15 runs-on: ubuntu-latest
18 OPENSTREETMAP_MEMCACHE_SERVERS: 127.0.0.1
21 - name: Checkout source
22 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24 uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
26 ruby-version: ${{ matrix.ruby }}
29 - name: Cache node modules
30 uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
33 - name: Install packages
35 sudo apt-get -yqq update
36 sudo apt-get -yqq install memcached libvips-dev
37 - name: Create database
39 sudo systemctl start postgresql
40 sudo -u postgres createuser -s $(id -un)
41 createdb openstreetmap
42 - name: Configure rails
44 cp config/github.database.yml config/database.yml
45 cp config/example.storage.yml config/storage.yml
46 touch config/settings.local.yml
47 - name: Install node modules
48 run: bundle exec bin/yarn install
49 - name: Populate database
51 sed -f script/normalise-structure db/structure.sql > db/structure.expected
52 rm -f db/structure.sql
53 bundle exec rails db:migrate
54 sed -f script/normalise-structure db/structure.sql > db/structure.actual
55 diff -uw db/structure.expected db/structure.actual
56 - name: Export javascript strings
57 run: bundle exec i18n export
58 - name: Compile assets
59 run: bundle exec rails assets:precompile
61 - name: Create tmp/pids directory
62 run: mkdir -p tmp/pids
64 run: bundle exec rails test:all
65 - name: Run javascript tests
66 run: bundle exec teaspoon
67 - name: Upload screenshots
68 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
73 if-no-files-found: ignore
74 - name: Report completion to Coveralls
75 uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
77 github-token: ${{ secrets.github_token }}
78 flag-name: ruby-${{ matrix.ruby }}
84 runs-on: ubuntu-latest
87 - name: Report completion to Coveralls
88 uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
90 github-token: ${{ secrets.github_token }}
91 parallel-finished: true