.github/workflows/ci.yml in iron_bank-5.3.2 vs .github/workflows/ci.yml in iron_bank-5.4.0

- old
+ new

@@ -1,49 +1,57 @@ name: CI on: + pull_request: push: branches: - main - pull_request: - branches: - - main jobs: - test: - name: Ruby - + specs: + name: Ruby ${{ matrix.ruby-version }} + runs-on: ubuntu-latest strategy: matrix: - ruby: - - 2.6 - - 2.7 - - 3.0 - - runs-on: ubuntu-latest - + ruby-version: + - '2.7' + - '3.0' + - '3.1' + - '3.2' steps: - - uses: zendesk/checkout@v2 - + - uses: zendesk/checkout@v3 - uses: zendesk/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} - - - uses: zendesk/cache@v2 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- - - - name: Install Dependencies - run: | - bundle config deployment true - bundle config path vendor/bundle - bundle install --jobs 4 - - - name: Run Tests - run: bundle exec rake + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run Specs + run: bundle exec rake spec env: ZUORA_CLIENT_ID: something ZUORA_CLIENT_SECRET: secret ZUORA_DOMAIN: rest.apisandbox.zuora.com + + specs_successful: + name: Specs passing? + needs: specs + if: always() + runs-on: ubuntu-latest + steps: + - run: | + if ${{ needs.specs.result == 'success' }} + then + echo "All specs pass" + else + echo "Some specs failed" + false + fi + + lint: + runs-on: ubuntu-latest + steps: + - uses: zendesk/checkout@v3 + - name: Set up Ruby + uses: zendesk/setup-ruby@v1 + with: + ruby-version: "3.0" + bundler-cache: true + - run: bundle exec rake rubocop