Add admin role and allow admin users to edit any link #13
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: Tests | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "main" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
ports: ["5432:5432"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Make bin/rails executable | |
run: chmod +x bin/rails | |
- name: Run tests | |
env: | |
DATABASE_URL: postgres://postgres:password@localhost:5432/test | |
RAILS_ENV: test | |
run: | | |
bin/rails test:prepare | |
bin/rails db:test:prepare | |
bin/rails test |