fixing up controller + adding testts #42
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: Rails Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Rails tests | |
strategy: | |
matrix: | |
ruby: | |
- '3.2.2' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.16.0 | |
cache: yarn | |
- name: Install packages | |
run: yarn install --pure-lockfile | |
- name: Setup test database | |
env: | |
RAILS_ENV: test | |
run: bin/rails db:setup | |
- name: Assets | |
run: bin/rails assets:precompile | |
- name: Run tests | |
run: bin/rails test | |
- name: Run rspec tests | |
run: bin/rails spec |