Skip to content

Qa link

Qa link #473

Workflow file for this run

name: CI
on:
pull_request:
branches: ['*']
push:
branches: [develop, main]
jobs:
audits:
name: Security Audits
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: Security audit dependencies
run: bundle exec bundler-audit --update --ignore CVE-2023-31606
- name: Security audit ruby
run: bundle exec ruby-audit update && bundle exec ruby-audit check --ignore CVE-2021-33621
- name: Security audit application code
run: bundle exec brakeman -q -w2
rubocop:
name: RuboCop
needs: [audits]
runs-on: ubuntu-latest
env:
IS_MERGE: ${{ github.base_ref == '' }}
PREV_SHA: ${{ github.event.before }}
TARGET_BRANCH: ${{ github.base_ref }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Lint changed files
run: bin/rubocop-ci ${{ env.TARGET_BRANCH || env.PREV_SHA }} ${{ env.IS_MERGE }}
rspec:
name: RSpec
needs: [audits, rubocop]
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create database.yml
run: cp config/database.yml.template config/database.yml
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Prepare database
run: bundle exec rails db:prepare
- name: Precompile assets
run: bundle exec rails assets:precompile
- name: Run tests
run: bundle exec rspec spec engines -p