CI #1067
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: | |
| workflow_dispatch: | |
| workflow_call: | |
| schedule: | |
| # Every day at 9pm | |
| - cron: '0 21 * * *' | |
| permissions: | |
| contents: read | |
| checks: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: '3.4' | |
| - name: Check for newer VCR version | |
| run: bin/toys check-vcr-version | |
| - name: RuboCop | |
| run: bin/rubocop | |
| - name: Typecheck | |
| run: bin/srb tc | |
| - name: Check for Updatable Sigils | |
| run: | | |
| bin/spoom bump --from false --to true --dry | |
| bin/spoom bump --from true --to strict --dry | |
| - name: Check for DSL rbi updates | |
| run: bin/tapioca dsl --verify | |
| - name: Markdown Lint | |
| run: bin/toys mdl | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - ruby-version: '3.2' | |
| experimental: false | |
| - ruby-version: '3.3' | |
| experimental: false | |
| - ruby-version: '3.4' | |
| experimental: false | |
| - ruby-version: 'head' | |
| experimental: true | |
| fail-fast: false | |
| continue-on-error: ${{ matrix.experimental }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: ${{ matrix.ruby-version }} | |
| - name: Cache test fixtures | |
| uses: actions/cache@v5 | |
| with: | |
| path: test/cassettes | |
| key: vcr-cassettes-${{ hashFiles('test/cassettes/**/*.yml') }} | |
| restore-keys: vcr-cassettes- | |
| - name: Run Tests (Using Cassettes) | |
| if: matrix.ruby-version != '3.4' | |
| run: bin/toys test | |
| - name: Run Tests (With Remote Calls & Coverage Report) | |
| if: matrix.ruby-version == '3.4' | |
| continue-on-error: true | |
| env: | |
| REMOTE_TESTS_ENABLED: ${{ vars.REMOTE_TESTS_ENABLED }} | |
| LUNCHMONEY_TOKEN: ${{ secrets.LUNCHMONEY_TOKEN }} | |
| run: bin/toys test | |
| - name: Upload Coverage Report | |
| if: matrix.ruby-version == '3.4' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 7 | |