up: make up ci ymls

main
Washington Botelho 2022-05-17 22:13:06 -03:00
parent 6554454fb8
commit 221f8fa296
2 changed files with 37 additions and 23 deletions

View File

@ -7,11 +7,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- name: Set up Ruby uses: actions/checkout@v3
- name: Ruby and Bundle Install
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 2.7 bundler-cache: true
bundler-cache: true # 'bundle install' and cache ruby-version: '2.7'
- name: Run RuboCop
- name: RuboCop
run: bundle exec rubocop --parallel run: bundle exec rubocop --parallel

View File

@ -1,38 +1,48 @@
name: Test name: Tests
on: on: [push, pull_request]
push:
pull_request:
jobs: jobs:
test: test:
runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
ruby: ruby:
- 2.7 - '2.7'
- '3.0' - '3.0'
- '3.1' - '3.1'
services: services:
mysql: mysql:
image: mysql:8
env: env:
MYSQL_DATABASE: rating_test MYSQL_DATABASE: rating_test
MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306 image: mysql:8
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ubuntu-latest ports:
- 3306:3306
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- uses: ruby/setup-ruby@v1 uses: actions/checkout@v3
- name: Ruby and Bundle Install
uses: ruby/setup-ruby@v1
with: with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true bundler-cache: true
- name: 'Runs tests' ruby-version: ${{ matrix.ruby }}
- name: Runs tests
run: bundle exec rake spec run: bundle exec rake spec
- name: 'Runs tests with config enabled'
- name: Runs tests with config enabled
run: bundle exec rake spec_config run: bundle exec rake spec_config
- name: 'Runs tests with config enabled for extra scopes'
- name: Runs tests with config enabled for extra scopes
run: bundle exec rake spec_config_with_extra_scopes run: bundle exec rake spec_config_with_extra_scopes