chore(deps): update dependency pact to v2 #3172
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: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| # Generic | |
| FORCE_COLOR: "1" | |
| CLICOLOR: "1" | |
| # Python | |
| PYTHONUNBUFFERED: "1" | |
| STABLE_PYTHON_VERSION: "3.13" | |
| jobs: | |
| complete: | |
| name: Test completion check | |
| if: always() | |
| permissions: | |
| contents: none | |
| runs-on: ubuntu-latest | |
| needs: | |
| - sqlite | |
| - postgres | |
| - mysql | |
| - rubocop | |
| - pact-verify | |
| - bundle-audit | |
| - pre-commit | |
| steps: | |
| - name: Failed | |
| run: exit 1 | |
| if: >- | |
| contains(needs.*.result, 'failure') | |
| || contains(needs.*.result, 'cancelled') | |
| || contains(needs.*.result, 'skipped') | |
| sqlite: | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby_version: ["3.2", "3.3", "3.4"] | |
| env: | |
| OAS_COVERAGE_CHECK_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby_version }} | |
| - run: "bundle install" | |
| - name: Tests | |
| run: "bundle exec rake ci" | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: sqlite | |
| files: coverage/coverage.xml | |
| disable_search: true | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: sqlite | |
| files: tmp/rspec/quick.xml,tmp/rspec/slow.xml | |
| disable_search: true | |
| report_type: test_results | |
| postgres: | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgres_docker_image_tag: | |
| - "13" | |
| - "14" | |
| - "15" | |
| - "16" | |
| - "17" | |
| - "18" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - run: script/test/run-rake-on-docker-compose-postgres.sh | |
| env: | |
| POSTGRES_DOCKER_IMAGE_TAG: ${{ matrix.postgres_docker_image_tag }} | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: postgres | |
| files: coverage/coverage.xml | |
| disable_search: true | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: postgres | |
| files: tmp/rspec/quick.xml,tmp/rspec/slow.xml | |
| disable_search: true | |
| report_type: test_results | |
| mysql: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - run: script/test/run-rake-on-docker-compose-mysql.sh | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: mysql | |
| files: coverage/coverage.xml | |
| disable_search: true | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: mysql | |
| files: tmp/rspec/quick.xml,tmp/rspec/slow.xml | |
| disable_search: true | |
| report_type: test_results | |
| rubocop: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - run: "bundle exec rubocop" | |
| pact-verify: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Verify pacts | |
| run: "GIT_SHA=${GITHUB_SHA} bundle exec rake pact:verify" | |
| env: | |
| PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_FOUNDATION_TOKEN }} | |
| PACT_BROKER_BASE_URL: https://pact-foundation.pactflow.io | |
| pact-v2-verify: | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| pact_url: | |
| - "https://raw.githubusercontent.com/pact-foundation/pact_broker-client/refs/heads/master/spec/pacts/Pact%20Broker%20Client%20V2-Pact%20Broker.json" | |
| - "https://raw.githubusercontent.com/pact-foundation/pact_broker-client/refs/heads/master/spec/pacts/pact_broker_client-pact_broker.json" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - run: bundle install | |
| - name: Verify pacts | |
| env: | |
| PACT_URL: ${{ matrix.pact_url }} | |
| run: "PACT_URL=${PACT_URL} bundle exec rake pact:v2:verify" | |
| bundle-audit: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Audit | |
| run: "bundle exec rake bundle:audit" | |
| pre-commit: | |
| name: Pre-commit | |
| runs-on: ubuntu-latest | |
| env: | |
| PRE_COMMIT_HOME: ${{ github.workspace }}/.pre-commit | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Cache pre-commit | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ${{ env.PRE_COMMIT_HOME }} | |
| key: | | |
| ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| enable-cache: true | |
| cache-suffix: pre-commit | |
| cache-dependency-glob: "" | |
| - name: Install pre-commit | |
| run: uv tool install pre-commit | |
| - name: Run pre-commit | |
| run: pre-commit run --show-diff-on-failure --color=always --all-files |