Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adiciona Github Actions #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Rails Pipeline

env:
RUBY_VERSION: 2.7.1
NODE_VERSION: 12.18.1
BUNDLER_VERSION: 2.1.4

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup System
run: sudo apt-get install -y libsqlite3-dev

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

- name: Bundle install
run: |
gem uninstall -aIx bundler
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Yarn Install
run: bin/yarn

- name: Rspec
run: |
bundle exec rails db:prepare
bundle exec rspec

- name: Rubocop
run: bundle exec rubocop -c .rubocop.yml

- name: Audit
run: |
gem install bundler-audit
bundle-audit --update
2 changes: 2 additions & 0 deletions spec/system/user_cancel_reservation_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'rails_helper'