Skip to content

Instantly share code, notes, and snippets.

@Pauloparakleto
Last active August 8, 2022 13:50
Show Gist options
  • Save Pauloparakleto/9196fa48f7d891fcd452a20780dd07cb to your computer and use it in GitHub Desktop.
Save Pauloparakleto/9196fa48f7d891fcd452a20780dd07cb to your computer and use it in GitHub Desktop.
pipeline for rails 7
name: Ruby
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: [ '5432:5432' ]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: 12345
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- name: Run the default task
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: 12345
RAILS_ENV: test
#TWILIO_ACCOUNT_ID: ${{secrets.TWILIO_ACCOUNT_ID}}
#TWILIO_AUTH_TOKEN: ${{secrets.TWILIO_AUTH_TOKEN}}
#CLOUD_NAME: ${{secrets.CLOUD_NAME}}
#CLOUD_API_KEY: ${{secrets.CLOUD_API_KEY}}
#CLOUD_API_SECRET: ${{secrets.CLOUD_API_SECRET}}
run: |
sudo apt-get -yqq install libpq-dev
gem install bundler -v 2.2.14
bundle install
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rails db:seed
bundle exec rspec
#- name: Rubocop Check
# run: |
# bundle exec rubocop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment