Skip to content

Commit 5dcb068

Browse files
Merge remote-tracking branch 'origin/main' into feature/CCM-15256-invalid-attachment-received-event
2 parents 30db77b + 453b908 commit 5dcb068

22 files changed

Lines changed: 1934 additions & 54 deletions

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
permissions:
1616
id-token: write
1717
contents: write
18-
packages: read
18+
packages: write
1919

2020
jobs:
2121
metadata:

.github/workflows/stage-2-test.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,48 @@ jobs:
146146
src/**/coverage.xml
147147
utils/**/coverage.xml
148148
lambdas/**/coverage.xml
149+
test-contract:
150+
name: "Contract tests"
151+
runs-on: ubuntu-latest
152+
timeout-minutes: 4
153+
permissions:
154+
contents: read
155+
packages: read
156+
steps:
157+
- name: "Checkout code"
158+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
159+
- uses: ./.github/actions/node-install
160+
with:
161+
node-version: ${{ inputs.nodejs_version }}
162+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
- name: "Install dependencies"
164+
run: npm ci --ignore-scripts
165+
- name: "Cache generated dependencies"
166+
id: schema-cache
167+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
168+
with:
169+
path: |
170+
schemas/digital-letters/
171+
output/digital-letters/
172+
src/digital-letters-events/types/
173+
src/digital-letters-events/validators/
174+
src/digital-letters-events/digital_letters_events/models/
175+
src/digital-letters-events/guard-functions/
176+
key: generated-deps-${{ runner.os }}-${{ hashFiles('src/cloudevents/**', 'src/typescript-schema-generator/**', 'src/python-schema-generator/**') }}
177+
- name: "Generate dependencies"
178+
if: steps.schema-cache.outputs.cache-hit != 'true'
179+
run: |
180+
npm run generate-dependencies
181+
- name: "Run contract test suite"
182+
run: |
183+
make test-contract
184+
- name: "Upload generated contracts"
185+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
186+
with:
187+
name: pact-contracts
188+
path: "tests/pact-tests/.pacts"
189+
include-hidden-files: true
190+
149191
test-lint:
150192
name: "Linting"
151193
runs-on: ubuntu-latest

.github/workflows/stage-4-acceptance.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ on:
2222
type: string
2323

2424
jobs:
25-
test-contract:
26-
name: "Contract test"
27-
runs-on: ubuntu-latest
28-
timeout-minutes: 10
29-
steps:
30-
- name: "Checkout code"
31-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
32-
- name: "Run contract test"
33-
run: |
34-
make test-contract
35-
- name: "Save result"
36-
run: |
37-
echo "Nothing to save"
3825
test-security:
3926
name: "Security test"
4027
runs-on: ubuntu-latest

.github/workflows/stage-5-publish.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,36 @@ jobs:
4040
name: "Publish packages"
4141
runs-on: ubuntu-latest
4242
timeout-minutes: 10
43+
permissions:
44+
contents: write
45+
packages: write
4346

4447
steps:
4548
- name: "Checkout code"
4649
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
50+
- uses: ./.github/actions/node-install
51+
with:
52+
node-version: ${{ inputs.nodejs_version }}
53+
GITHUB_TOKEN: ${{ github.token }}
4754
- name: "Get artifacts: jekyll docs"
4855
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
4956
with:
5057
path: ./artifacts/jekyll-docs-${{ inputs.version }}
5158
name: jekyll-docs-${{ inputs.version }}
52-
5359
- name: "Get artifacts: schema"
5460
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
5561
with:
5662
path: ./artifacts/schemas-${{ inputs.version }}
5763
name: schemas-${{ inputs.version }}
64+
- name: "Get artifacts: pact contracts"
65+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
66+
with:
67+
path: ./pact-contracts/pacts
68+
name: pact-contracts
69+
- name: "Publish pact contracts package"
70+
run: |
71+
export BRANCH_NAME=${GITHUB_HEAD_REF:-$(echo $GITHUB_REF | sed 's#refs/heads/##')}
72+
scripts/publish-pact-contracts.sh
5873
5974
6075
- name: Draft Release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ coverage.xml
5757
*.coverage
5858
coverage/
5959
coverage-*/
60+
**/.pacts
61+
/pact-contracts/pacts
6062
**/playwright-report
6163
**/test-results
6264
plugin-cache

docs/Gemfile.lock

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (8.1.1)
4+
activesupport (8.1.3)
55
base64
66
bigdecimal
77
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -14,15 +14,15 @@ GEM
1414
securerandom (>= 0.3)
1515
tzinfo (~> 2.0, >= 2.0.5)
1616
uri (>= 0.13.1)
17-
addressable (2.8.7)
18-
public_suffix (>= 2.0.2, < 7.0)
17+
addressable (2.9.0)
18+
public_suffix (>= 2.0.2, < 8.0)
1919
ast (2.4.3)
2020
base64 (0.3.0)
21-
bigdecimal (3.3.1)
21+
bigdecimal (4.1.2)
2222
cgi (0.5.0)
2323
colorator (1.1.0)
24-
concurrent-ruby (1.3.5)
25-
connection_pool (2.5.4)
24+
concurrent-ruby (1.3.6)
25+
connection_pool (3.0.2)
2626
csv (3.3.5)
2727
drb (2.2.3)
2828
em-websocket (0.5.3)
@@ -66,7 +66,7 @@ GEM
6666
activesupport (>= 2)
6767
nokogiri (>= 1.4)
6868
http_parser.rb (0.8.0)
69-
i18n (1.14.7)
69+
i18n (1.14.8)
7070
concurrent-ruby (~> 1.0)
7171
jekyll (4.4.1)
7272
addressable (~> 2.4)
@@ -112,7 +112,7 @@ GEM
112112
gemoji (>= 3, < 5)
113113
html-pipeline (~> 2.2)
114114
jekyll (>= 3.0, < 5.0)
115-
json (2.15.2)
115+
json (2.19.4)
116116
just-the-docs (0.10.1)
117117
jekyll (>= 3.8.5)
118118
jekyll-include-cache
@@ -130,22 +130,24 @@ GEM
130130
rb-inotify (~> 0.9, >= 0.9.10)
131131
logger (1.7.0)
132132
mercenary (0.4.0)
133-
minitest (5.26.0)
134-
nokogiri (1.18.10-aarch64-linux-gnu)
133+
minitest (6.0.4)
134+
drb (~> 2.0)
135+
prism (~> 1.5)
136+
nokogiri (1.19.2-aarch64-linux-gnu)
135137
racc (~> 1.4)
136-
nokogiri (1.18.10-aarch64-linux-musl)
138+
nokogiri (1.19.2-aarch64-linux-musl)
137139
racc (~> 1.4)
138-
nokogiri (1.18.10-arm-linux-gnu)
140+
nokogiri (1.19.2-arm-linux-gnu)
139141
racc (~> 1.4)
140-
nokogiri (1.18.10-arm-linux-musl)
142+
nokogiri (1.19.2-arm-linux-musl)
141143
racc (~> 1.4)
142-
nokogiri (1.18.10-arm64-darwin)
144+
nokogiri (1.19.2-arm64-darwin)
143145
racc (~> 1.4)
144-
nokogiri (1.18.10-x86_64-darwin)
146+
nokogiri (1.19.2-x86_64-darwin)
145147
racc (~> 1.4)
146-
nokogiri (1.18.10-x86_64-linux-gnu)
148+
nokogiri (1.19.2-x86_64-linux-gnu)
147149
racc (~> 1.4)
148-
nokogiri (1.18.10-x86_64-linux-musl)
150+
nokogiri (1.19.2-x86_64-linux-musl)
149151
racc (~> 1.4)
150152
parallel (1.27.0)
151153
parser (3.3.10.0)
@@ -154,7 +156,7 @@ GEM
154156
pathutil (0.16.2)
155157
forwardable-extended (~> 2.6)
156158
prism (1.6.0)
157-
public_suffix (6.0.2)
159+
public_suffix (7.0.5)
158160
racc (1.8.1)
159161
rainbow (3.1.1)
160162
rake (13.3.1)
@@ -202,7 +204,7 @@ GEM
202204
tzinfo (2.0.6)
203205
concurrent-ruby (~> 1.0)
204206
unicode-display_width (2.6.0)
205-
uri (1.1.0)
207+
uri (1.1.1)
206208
webrick (1.9.1)
207209

208210
PLATFORMS
@@ -234,4 +236,4 @@ DEPENDENCIES
234236
wdm (~> 0.1.1)
235237

236238
BUNDLED WITH
237-
2.6.9
239+
2.4.1

eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,12 @@ export default defineConfig([
224224
'import-x/no-relative-packages': 0,
225225
},
226226
},
227+
{
228+
files: ['tests/pact-tests/**'],
229+
rules: {
230+
'no-relative-import-paths/no-relative-import-paths': 0,
231+
},
232+
},
227233
{
228234
files: ['scripts/**'],
229235
rules: {

0 commit comments

Comments
 (0)