Merge pull request #28 from jeferson-sb/feat/add-categories #71
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
name: "Ruby on Rails CI" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["*"] | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./api | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | |
with: | |
working-directory: ./api | |
bundler-cache: true | |
- name: Run docker | |
run: docker-compose up -d | |
- name: Set up database schema | |
run: bin/rails db:create && bin/rails db:migrate RAILS_ENV=test && bin/rails db:schema:load | |
- name: Run tests | |
run: bundle exec rspec |