Prevent league configs overriding the servercfgfile, should fix custom #861
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
rubocop: | |
name: Rubocop | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
- name: Install Rubocop | |
run: gem install rubocop | |
- name: Check code | |
run: rubocop app | |
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: Dummy API key | |
run: echo "STEAM_WEB_API_KEY = 'foo'" > config/initializers/steam.rb | |
- 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 | |
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: Dummy API key | |
run: echo "STEAM_WEB_API_KEY = 'foo'" > config/initializers/steam.rb | |
- 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 | |
run: bundle exec cucumber features |