Test ci error #763
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: 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 CVE-2023-50724 CVE-2023-50725 CVE-2023-50727 | |
- 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 | |
REMOTE_DRIVER: http://localhost:9515/wd/hub | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup chromedriver | |
uses: nanasess/setup-chromedriver@v2 | |
with: | |
chromedriver-version: '120.0.6099.109' | |
- name: Run chromedriver | |
run: | | |
export DISPLAY=:99 | |
chromedriver --url-base=/wd/hub & | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | |
- 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 |