Allow users to define tag sorting order #1129
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] | |
workflow_dispatch: | |
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-50724 CVE-2023-50725 CVE-2023-50727 CVE-2024-21510 | |
- name: Security audit ruby | |
run: bundle exec ruby-audit update && bundle exec ruby-audit check --ignore CVE-2021-33621 CVE-2024-27282 | |
- 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 }} | |
FALLBACK_BRANCH: 'origin/develop' | |
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.FALLBACK_BRANCH }} ${{ env.IS_MERGE }} | |
rspec: | |
name: RSpec | |
needs: [audits, rubocop] | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- 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 |