Skip to content

version a missing template file #189

version a missing template file

version a missing template file #189

Workflow file for this run

name: Verify
on: [push]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.8
env:
POSTGRES_USER: "maglev"
POSTGRES_PASSWORD: "password"
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
node: [20]
gemfile: ["Gemfile.rails_6", "Gemfile.rails_7_0", "Gemfile"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems using ${{ matrix.gemfile }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
- name: Enable Corepack before setting up Node
run: |
corepack enable
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Install packages
run: |
yarn install
- name: Setup test database
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
RAILS_ENV: test
MAGLEV_APP_DATABASE_USERNAME: "maglev"
MAGLEV_APP_DATABASE_PASSWORD: "password"
run: |
bin/rails db:setup
- name: Run Rails tests
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
MAGLEV_APP_DATABASE_USERNAME: "maglev"
MAGLEV_APP_DATABASE_PASSWORD: "password"
run: bundle exec rspec
- name: Run Javascript tests
run: yarn test
# NOTE: disabled because an error of eslint in the GH env
# - name: Run Javascript linter
# run: yarn lint