Rails 7.2 #532
Workflow file for this run
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 install a prebuilt Ruby version, install dependencies, and | |
# run tests and linters. | |
name: "Main Workflow" | |
on: | |
push: | |
branches: [ master, production ] | |
pull_request: | |
branches: [ master, production ] | |
jobs: | |
rspec: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: db_test | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
env: | |
RAILS_ENV: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby 3.3.6 | |
uses: ruby/setup-ruby@v1.214.0 | |
with: | |
ruby-version: 3.3.6 | |
bundler-cache: true | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
DATABASE_URL: "postgres://postgres@localhost:5432/db_test" | |
run: | | |
bundle exec rake db:schema:load | |
bundle exec rspec --format documentation --require rails_helper | |
- name: Publish code coverage | |
uses: paambaati/codeclimate-action@v9.0.0 | |
env: | |
CC_TEST_REPORTER_ID: 11390e99ff161ee53c4476bafb1fecfaca3efa634567ff188fcf3a49a3319553 | |
rubocop: | |
name: rubocop | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Curl rubocop.yml | |
run: curl https://raw.githubusercontent.com/leticiaoliveira5/code-style/master/.rubocop.3.yml -o .rubocop.yml | |
- name: Set up Ruby 3.3.6 | |
uses: ruby/setup-ruby@v1.214.0 | |
with: | |
ruby-version: 3.3.6 | |
bundler-cache: true | |
- name: run rubocop | |
uses: reviewdog/action-rubocop@v2.3.0 | |
with: | |
rubocop_version: gemfile | |
rubocop_extensions: rubocop-rails:gemfile rubocop-rspec:gemfile | |
reporter: github-pr-check |