Skip to content

Bump rails from 7.0.6 to 7.0.7.2 in /WcaOnRails #259

Bump rails from 7.0.6 to 7.0.7.2 in /WcaOnRails

Bump rails from 7.0.6 to 7.0.7.2 in /WcaOnRails #259

Workflow file for this run

name: Ruby tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
env:
RACK_ENV: test
RAILS_ENV: test
defaults:
run:
working-directory: WcaOnRails
steps:
- uses: actions/checkout@v3
- uses: fregante/setup-git-user@v2 # set up dummy user.name and user.email in git so that Overcommit doesn't explode
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: WcaOnRails
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v3 # this also includes Yarn
with:
node-version: '16'
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules
- uses: actions/cache@v3
with:
path: '~/.cache/yarn'
key: ${{ runner.os }}-yarn
- name: Install fresh Yarn packages
run: bundle exec rake yarn:install
- name: Run Overcommit commit hooks
working-directory: ${{ env.GITHUB_WORKSPACE }}
env:
BUNDLE_GEMFILE: WcaOnRails/Gemfile
run: bundle exec overcommit --sign && bundle exec overcommit --sign pre-commit && bundle exec overcommit --run
- name: Activate MySQL # as per https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
run: |
sudo systemctl start mysql.service
- name: Populate database with seeds
run: bundle exec rake db:reset
- name: Pre-compile assets for frontend tests
env:
DISABLE_SPRING: 1
run: bundle exec i18n export && bundle exec rake assets:precompile
- name: Run tests
id: rspec
run: bundle exec rake
- name: Push coverage data to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: 'WcaOnRails/coverage/lcov/WcaOnRails.lcov'
base-path: 'WcaOnRails'
- uses: actions/upload-artifact@v3
if: always() && steps.rspec.outcome == 'failure'
with:
name: capybara-screenshots
path: WcaOnRails/tmp/capybara