name: CI on: pull_request: push: branches: - main jobs: specs: name: Ruby ${{ matrix.ruby-version }} runs-on: ubuntu-latest strategy: matrix: ruby-version: - '2.7' - '3.0' - '3.1' - '3.2' steps: - uses: zendesk/checkout@v3 - uses: zendesk/setup-ruby@v1 with: 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