try bundle update 2 #474
This file contains hidden or 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: "CI" | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_DB: rails_test | |
POSTGRES_USER: rails | |
POSTGRES_PASSWORD: password | |
redis: | |
image: redis:latest | |
ports: | |
- "6379:6379" | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | |
REDIS_URL: "redis://localhost:6379/1" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
#with: | |
# bundler-cache: true | |
- name: Bundle install | |
run: bundle install | |
- name: Set up database | |
run: bundle exec rails db:setup | |
- name: Run tests | |
run: bundle exec rails test | |
- name: Run system tests | |
run: bundle exec rails test:system | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
#with: | |
# bundler-cache: true # otherwise `cannot load such file -- rubocop-minitest` | |
- name: Bundle install | |
run: bundle install | |
- name: Rubocop | |
run: bundle exec rubocop -DP | |
- name: Brakeman | |
run: bundle exec brakeman | |
- name: Bundle audit | |
run: bundle exec bundle-audit check --update |