Skip to content

Try to avoid spams by robots #570

Try to avoid spams by robots

Try to avoid spams by robots #570

Workflow file for this run

# Inspired from examples in the README of https://github.com/ruby/setup-ruby
name: CI Unit Tests
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.8
env:
POSTGRES_USER: mathraining
POSTGRES_PASSWORD: password1
POSTGRES_DB: pg_test
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
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.0.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0 # Not needed with a .ruby-version file
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Bundle install
env:
RAILS_ENV: test
run: |
bundle install
#bundle update rake
#gem update --system 3.0.0
#gem install bundler --version 2.2.27
- name: Test with Rake
env:
PGHOST: postgres
PGUSER: mathraining
PGPORT: ${{ job.services.postgres.ports[5432] }}
RAILS_ENV: test
run: |
export SECRET_KEY_BASE=$(rails secret)
RAILS_ENV=test bundle exec rake db:migrate --trace
bundle exec rake db:test:prepare
bundle exec rspec
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage/.resultset.json