Convert README to Him branding #3
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| actions: write | |
| contents: read | |
| id-token: write | |
| packages: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ["3.1", "3.2", "3.3"] | |
| gemfile: | |
| - gemfiles/Gemfile.activemodel-6.1 | |
| - gemfiles/Gemfile.activemodel-7.0 | |
| - gemfiles/Gemfile.activemodel-7.1 | |
| - gemfiles/Gemfile.activemodel-7.2 | |
| - gemfiles/Gemfile.activemodel-8.0 | |
| exclude: | |
| - ruby: "3.1" | |
| gemfile: gemfiles/Gemfile.activemodel-8.0 | |
| env: | |
| BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run tests with coverage | |
| run: bundle exec rake spec | |
| env: | |
| COVERAGE: ${{ matrix.ruby == '3.3' && matrix.gemfile == 'gemfiles/Gemfile.activemodel-8.0' && 'true' || '' }} | |
| - name: Upload coverage artifact | |
| if: matrix.ruby == '3.3' && matrix.gemfile == 'gemfiles/Gemfile.activemodel-8.0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 1 | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| continue-on-error: true | |
| - name: Upload coverage to Qlty | |
| uses: qltysh/qlty-action/coverage@v1 | |
| continue-on-error: true | |
| env: | |
| QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| with: | |
| oidc: true | |
| files: coverage/coverage.json | |
| - name: Run Qlty code quality checks | |
| run: | | |
| curl -sSfL https://qlty.sh | sh | |
| echo "$HOME/.qlty/bin" >> $GITHUB_PATH | |
| ~/.qlty/bin/qlty check || true | |
| continue-on-error: true | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| - name: Run bundle audit | |
| run: | | |
| gem install bundler-audit | |
| bundle audit --update || true | |
| continue-on-error: true |