Bump the bundler group across 1 directory with 6 updates #124
Workflow file for this run
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: "Ruby on Rails 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 | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install chrome | |
uses: browser-actions/setup-chrome@latest | |
- run: chrome --version | |
- name: Install xvfb | |
run: | | |
sudo apt-get update | |
sudo apt-get install xvfb | |
- 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: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install package.json dependencies | |
run: yarn install --verbose | |
- name: Build Javascript | |
run: yarn run build | |
- name: Build CSS | |
run: yarn run build:css | |
- name: Run tests | |
run: xvfb-run --auto-servernum bundle exec rspec | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage/.resultset.json | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup Bundle Audit | |
run: gem install bundle-audit | |
- name: Security audit dependencies | |
run: bundle exec bundle audit check --update | |
continue-on-error: true | |
- name: Setup Brakeman | |
run: gem install brakeman | |
- name: Security audit application code | |
run: bundle exec brakeman -q -w2 | |
continue-on-error: true | |
- name: Setup Rubocop | |
run: gem install rubocop | |
- name: Lint Ruby files | |
run: bundle exec rubocop --parallel |