Skip to content

Update league_maps.rb #1494

Update league_maps.rb

Update league_maps.rb #1494

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Ruby
on: [push, pull_request]
jobs:
ruby-dependencies:
name: Ruby dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository ppa:maxmind/ppa
sudo apt update
sudo apt install libmaxminddb0 libmaxminddb-dev redis-server memcached
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
linters:
name: Linters
needs: [ruby-dependencies]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Check code
run: bundle exec rubocop app
- name: Run type check
run: bundle exec srb tc
- name: Verify gem RBIs are up-to-date
run: bundle exec tapioca gem --verify
rspec:
name: RSpec
runs-on: ubuntu-latest
needs: [ruby-dependencies]
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: serveme
POSTGRES_DB: serveme_test
POSTGRES_PASSWORD: secret
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository ppa:maxmind/ppa
sudo apt update
sudo apt install libmaxminddb0 libmaxminddb-dev redis-server memcached
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup test database
env:
RAILS_ENV: test
PGHOST: localhost
PGUSER: serveme
PGPASSWORD: secret
run: |
bin/rails db:create db:migrate
- name: Run RSpec tests
env:
RAILS_ENV: test
PGHOST: localhost
PGUSER: serveme
PGPASSWORD: secret
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bundle exec rspec spec
cucumber:
name: Cucumber
runs-on: ubuntu-latest
needs: [ruby-dependencies]
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: serveme
POSTGRES_DB: serveme_test
POSTGRES_PASSWORD: secret
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository ppa:maxmind/ppa
sudo apt update
sudo apt install libmaxminddb0 libmaxminddb-dev redis-server memcached
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup test database
env:
RAILS_ENV: test
PGHOST: localhost
PGUSER: serveme
PGPASSWORD: secret
run: |
bin/rails db:create db:migrate
- name: Run Cucumber features
env:
RAILS_ENV: test
PGHOST: localhost
PGUSER: serveme
PGPASSWORD: secret
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bundle exec cucumber features