Skip to content

feat: add Docker configuration for consistent test environment #5

feat: add Docker configuration for consistent test environment

feat: add Docker configuration for consistent test environment #5

Workflow file for this run

name: Pact Contract Tests
on:
push:
branches: [main, fix/pact-contract-tests]
pull_request:
branches: [main]
jobs:
contract-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Consumer Contract Tests
run: npm run test:consumer
- name: Run Provider Contract Tests
run: npm run test:provider
- name: Upload Pact files
uses: actions/upload-artifact@v4
with:
name: pact-files-node-${{ matrix.node-version }}
path: __tests__/contract/pacts/
retention-days: 30