Skip to content

add a tag diff to the /history endpoint #3

add a tag diff to the /history endpoint

add a tag diff to the /history endpoint #3

Workflow file for this run

name: Tests
on:
push:
branches-ignore:
- "dependabot/**"
- translatewiki
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: ['3.2', '3.3', '3.4']
fail-fast: false
runs-on: ubuntu-latest
env:
RAILS_ENV: test
OPENSTREETMAP_MEMCACHE_SERVERS: 127.0.0.1
timeout-minutes: 20
steps:
- name: Checkout source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup ruby
uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: 3.4.10
bundler-cache: true
- name: Cache node modules
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: yarn
- name: Install packages
run: |
sudo apt-get -yqq update
sudo apt-get -yqq install memcached libvips-dev xvfb mesa-utils libgl1-mesa-dri
- name: Create database
run: |
sudo systemctl start postgresql
sudo -u postgres createuser -s $(id -un)
createdb openstreetmap
- name: Configure rails
run: |
cp config/github.database.yml config/database.yml
cp config/example.storage.yml config/storage.yml
touch config/settings.local.yml
- name: Install node modules
run: bundle exec bin/yarn install
- name: Populate database
run: |
sed -f script/normalise-structure db/structure.sql > db/structure.expected
rm -f db/structure.sql
bundle exec rails db:migrate
sed -f script/normalise-structure db/structure.sql > db/structure.actual
diff -uw db/structure.expected db/structure.actual
- name: Export javascript strings
run: bundle exec i18n export
- name: Compile assets
run: bundle exec rails assets:precompile
timeout-minutes: 10
- name: Create tmp/pids directory
run: mkdir -p tmp/pids
- name: Enable virtual display
run: Xvfb :99 -screen 0 1024x768x24 &
- name: Run tests
run: bundle exec rails test:all
env:
DISPLAY: ":99"
- name: Run javascript tests
run: bundle exec teaspoon
env:
DISPLAY: ":99"
- name: Upload screenshots
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: screenshots
path: tmp/screenshots
if-no-files-found: ignore
- name: Report completion to Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
with:
github-token: ${{ secrets.github_token }}
flag-name: ruby-${{ matrix.ruby }}
format: lcov
parallel: true
finish:
name: Finalise
needs: test
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Report completion to Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true