Updates for 07/25/23 #1214
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: .github/workflows/verify.yml | |
on: [push] | |
jobs: | |
# | |
# | |
# Unit Tests | |
# | |
# | |
unit_tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install PostgreSQL client | |
run: | | |
sudo apt-get -yqq install libpq-dev | |
- name: Build App | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
RAILS_ENV: test | |
run: | | |
bin/rails db:setup | |
- name: Prep assets | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
RAILS_ENV: test | |
run: | | |
bundle install && yarn install && yarn build:css && yarn build | |
- name: Execute unit tests | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
RAILS_ENV: test | |
run: | | |
./bin/rails test | |
# | |
# | |
# Rubocop | |
# | |
# | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
- name: Run rubocop | |
run: | | |
gem install rubocop | |
rubocop app/ | |
# | |
# | |
# Reek | |
# | |
# | |
reek: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
- name: Run Reek | |
run: | | |
gem install reek | |
reek app/ |