Skip to content

Commit

Permalink
Merge pull request #56 from TreinaDev/add-github-actions
Browse files Browse the repository at this point in the history
Setup Github Actions
  • Loading branch information
joaorsalmeida authored Jul 2, 2024
2 parents 4625406 + 167c523 commit ab87100
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add or replace dependency steps here
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
# Add or replace database setup steps here
- name: Set up database schema
run: bin/rails db:schema:load
# Add or replace test runners here
- name: Run tests
run: bin/rake spec

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Install Bundler Audit
run: gem install bundler-audit
# Add or replace any other lints here
- name: Security audit dependencies
run: bundle-audit check --update
- name: Lint Ruby files
run: bundle exec rubocop

0 comments on commit ab87100

Please sign in to comment.