Merge pull request #1183 from owen2345/fix/phase-6b-helper-concern-fo… #87
This file contains hidden or 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: Audit | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| security_audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f | |
| with: | |
| bundler-cache: true | |
| - name: Scan for common Rails security vulnerabilities using static analysis | |
| run: bin/brakeman --no-pager | |
| - name: Scan for known security vulnerabilities in gems used | |
| run: bin/bundler-audit | |
| rubocop: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUBOCOP_CACHE_ROOT: tmp/rubocop | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f | |
| with: | |
| bundler-cache: true | |
| - name: Prepare RuboCop cache | |
| uses: actions/cache@v5 | |
| env: | |
| DEPENDENCIES_HASH: ${{ hashFiles('.tool-versions', '**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }} | |
| with: | |
| path: ${{ env.RUBOCOP_CACHE_ROOT }} | |
| key: rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }} | |
| restore-keys: | | |
| rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}- | |
| - name: Lint code for consistent style | |
| run: bin/rubocop -f github |