Update ci.yml #10
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] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby-version: ["3.4"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rspec | |
| - name: Run RuboCop (fail only on errors) | |
| run: bundle exec rubocop --fail-level error | |
| - name: Generate RBI files (Tapioca) | |
| run: | | |
| bundle exec tapioca gems | |
| bundle exec tapioca dsl | |
| - name: Run Sorbet type checker | |
| run: bundle exec srb tc | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Run tests with coverage | |
| run: bundle exec rspec | |
| env: | |
| COVERAGE: true | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage/coverage.xml | |
| fail_ci_if_error: false |