Skip to content

Commit

Permalink
Merge branch 'master' into feat/aggregated-provider-states-2
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F authored Jan 30, 2025
2 parents 96f1328 + 79ebfcd commit c0ddd9b
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 120 deletions.
14 changes: 14 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices"],
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
"packageRules": [
{
"groupName": "Ruby 3.2",
"groupSlug": "ruby-3.2",
"matchPackageNames": ["ruby"],
"allowedVersions": "<=3.2"
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/release_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- id: release-gem
uses: pact-foundation/release-gem@v1
uses: pact-foundation/release-gem@b1b4ab9ad10605e41a34f13f1c2baae78d73bfa7 # v1
env:
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_API_KEY }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Notify ${{ matrix.repository }} of gem release
uses: peter-evans/repository-dispatch@v3
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
token: ${{ secrets.GHTOKENNOTIFYPBRELEASED }}
repository: ${{ matrix.repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reproduce_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
run:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: docker compose -f docker-compose-issue-repro.yml up --abort-on-container-exit --exit-code-from repro-issue
55 changes: 43 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,46 @@ 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

jobs:
complete:
name: Test completion check
if: always()

permissions:
contents: none

runs-on: ubuntu-latest
needs:
- sqlite
- postgres
- mysql
- rubocop
- pact-verify
- bundle-audit

steps:
- name: Failed
run: exit 1
if: >-
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
sqlite:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
Expand All @@ -19,57 +50,57 @@ jobs:
env:
OAS_COVERAGE_CHECK_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- run: "bundle install"
- name: Tests
run: "bundle exec rake ci"

postgres:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
postgres_docker_image_tag: ["15", "14", "9.6"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: script/test/run-rake-on-docker-compose-postgres.sh
env:
POSTGRES_DOCKER_IMAGE_TAG: ${{ matrix.postgres_docker_image_tag }}

mysql:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: script/test/run-rake-on-docker-compose-mysql.sh

rubocop:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: "bundle exec rubocop"

pact-verify:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Verify pacts
run: "GIT_SHA=${GITHUB_SHA} GIT_BRANCH=${GITHUB_REF##*/} bundle exec rake pact:verify"
env:
PACTFLOW_PACT_FOUNDATION_TOKEN: ${{ secrets.PACTFLOW_PACT_FOUNDATION_TOKEN }}

bundle-audit:
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger_pact_docs_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger docs.pact.io update workflow
uses: peter-evans/repository-dispatch@v3
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
token: ${{ secrets.GHTOKENFORTRIGGERINGPACTDOCSUPDATE }}
repository: pact-foundation/docs.pact.io
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.4
3.2.6
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.4-alpine3.18
FROM ruby:3.2.4-alpine3.18@sha256:d048a1acdba980fecea26b1064c786d3d379d98948f942f05d2e5dc269b5016b

WORKDIR /home

Expand Down
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ source "https://rubygems.org"
gemspec


gem "rake", "~>12.3.3"
gem "rake", "~>13.0"
gem "sqlite3", ">=2.0.0"
gem "conventional-changelog", "~>1.3"
gem "bump", "~> 0.5"
gem "padrino-core", ">= 0.14.3", "~> 0.14", require: false
gem "sinatra", "~> 3.0", require: false

group :development do
gem "pry-byebug"
gem "rubocop", "~>1.1"
gem "rubocop-performance", "~> 1.11"
gem "rubocop", "~>1.7"
gem "rubocop-performance", "~> 1.23"
gem "sequel-annotate", "~>1.3"
gem "yard", "~> 0.9"
end
Expand All @@ -21,7 +23,6 @@ group :test do
gem "pact", "~>1.14"
gem "rspec-pact-matchers", "~>0.1"
gem "bundler-audit", "~>0.4"
gem "fakefs", "~>0.4"
gem "webmock", "~>3.9"
gem "rspec", "~>3.0"
gem "rspec-its", "~>1.2"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
mysql:
image: mysql:5.7.28
image: mysql:5.7.44@sha256:4bc6bc963e6d8443453676cae56536f4b8156d78bae03c0145cbe47c2aad73bb
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: pact_broker
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-dev-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres:
image: postgres
image: postgres@sha256:888402a8cd6075c5dc83a31f58287f13306c318eaad016661ed12e076f3e6341
healthcheck:
test: psql postgres --command "select 1" -U postgres
ports:
Expand Down Expand Up @@ -34,7 +34,7 @@ services:
- ./Rakefile:/home/Rakefile

shell:
image: ruby:3.2.4-alpine
image: ruby:3.2.4-alpine@sha256:867125ca5fed8316e90a5fba593ecb86392073d6d26f44307f4936218d2f5613
depends_on:
- pact-broker
entrypoint: /bin/sh
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-issue-repro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres:
image: postgres
image: postgres@sha256:888402a8cd6075c5dc83a31f58287f13306c318eaad016661ed12e076f3e6341
healthcheck:
test: psql postgres --command "select 1" -U postgres
environment:
Expand All @@ -11,7 +11,7 @@ services:
POSTGRES_DB: postgres

pact-broker:
image: pactfoundation/pact-broker:2.94.0.0
image: pactfoundation/pact-broker:2.94.0.0@sha256:dbdb641c0906ff583a66e5c36aba9f17b8fa9019c12329eacd7e688c6e7871df
ports:
- "9292:9292"
# depends_on:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"

services:
postgres:
image: postgres
image: postgres@sha256:888402a8cd6075c5dc83a31f58287f13306c318eaad016661ed12e076f3e6341
healthcheck:
test: psql postgres --command "select 1" -U postgres
# ports:
Expand Down Expand Up @@ -50,7 +50,7 @@ services:
- ./docs:/home/docs

mysql:
image: mysql:5.7.28
image: mysql:5.7.44@sha256:4bc6bc963e6d8443453676cae56536f4b8156d78bae03c0145cbe47c2aad73bb
#image: arm64v8/mysql # for m1 macs
command: --default-authentication-plugin=mysql_native_password
environment:
Expand Down
2 changes: 1 addition & 1 deletion issue-reproduction/Dockerfile-pact-broker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7-alpine
FROM ruby:2.7-alpine@sha256:371668748735a808d1fd1c506878e09f40cb542ffc758cfa7eb124f90827e8d9

RUN apk update \
&& apk --no-cache add \
Expand Down
4 changes: 1 addition & 3 deletions pact_broker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "semver2", "~> 3.4.2"
gem.add_runtime_dependency "rack", ">= 2.2.3", "~> 2.2" # TODO update to 3
gem.add_runtime_dependency "redcarpet", ">= 3.5.1", "~>3.5"
gem.add_runtime_dependency "pact-support" , "~> 1.16", ">= 1.16.4"
gem.add_runtime_dependency "padrino-core", ">= 0.14.3", "~> 0.14"
gem.add_runtime_dependency "sinatra", "~> 3.0"
gem.add_runtime_dependency "pact-support" , ">= 1.21.2", "~> 1.21"
gem.add_runtime_dependency "haml", "~>5.0"
gem.add_runtime_dependency "sucker_punch", "~>3.0"
gem.add_runtime_dependency "rack-protection", "~> 3.0"
Expand Down
27 changes: 0 additions & 27 deletions spec/lib/pact_broker/api/contracts/base_contract_spec.rb

This file was deleted.

37 changes: 0 additions & 37 deletions spec/support/verification_job.rb

This file was deleted.

22 changes: 0 additions & 22 deletions spec/support/webhook_endpoint_middleware.rb

This file was deleted.

0 comments on commit c0ddd9b

Please sign in to comment.