padawan - don't deploy fake seed bills to prod #64
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: Run RSpec tests | |
on: [push] | |
jobs: | |
run-rspec-tests: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
VAPID_PUBLIC_KEY: BCUWtDYeou4CLLwWUu44NylAkAkPYNobTJ7wuWhvjBb0YF4JhJAT_GeUrOjJvoXvcTO4ehmeCHyP0QH2mS5cyj4 # testing only | |
VAPID_PRIVATE_KEY: WE83Oc3c1GaC08gcEM2YKddtTpx0DdrjEfTHONVqR0s # testing only | |
SWAY_DATABASE_PASSWORD: testing123! # testing only | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3.5" | |
bundler-cache: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22.11.0" | |
cache: "npm" | |
- name: Install JS dependencies | |
run: npm ci --legacy-peer-deps | |
- name: Precompile assets | |
run: npm run build | |
- name: Set up database | |
run: | # multi-line run command: https://stackoverflow.com/a/66809682/6410635 | |
bundle exec rails db:create | |
bundle exec rails db:migrate | |
bundle exec rails db:schema:load | |
bundle exec rails db:seed | |
- name: Set up certs | |
run: | # multi-line run command: https://stackoverflow.com/a/66809682/6410635 | |
mv config/ssl/github-cert.pem config/ssl/cert.pem | |
mv config/ssl/github-key.pem config/ssl/key.pem | |
- name: Run tests | |
run: | # multi-line run command: https://stackoverflow.com/a/66809682/6410635 | |
bundle exec rspec |