Skip to content

Fix some checks in the anonymize script #2702

Fix some checks in the anonymize script

Fix some checks in the anonymize script #2702

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
redis:
image: redis:alpine
ports: [ "6379:6379" ]
options: --entrypoint redis-server
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run asset pre compilation
run: bundle exec rails assets:precompile
- name: Run tests
run: bundle exec rspec
lint:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
redis:
image: redis:alpine
ports: [ "6379:6379" ]
options: --entrypoint redis-server
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Security audit dependencies
run: bundle exec bundler-audit --update
- name: Security audit application code
run: bundle exec brakeman -q -w2
- name: Lint Ruby files
run: bundle exec rubocop
- name: Set up database schema
run: bin/rails db:schema:load
- name: Check auto-loading
run: bundle exec rails zeitwerk:check