Skip to content

ci: wrong Bundler gemfile names #139

ci: wrong Bundler gemfile names

ci: wrong Bundler gemfile names #139

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: [18]
gemfile: ["Gemfile.rails_6", "Gemfile.rails_7_0", "Gemfile"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby and install gems using ${{ matrix.gemfile }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Install packages
run: |
yarn install --pure-lockfile
- 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