Skip to content

Commit

Permalink
Switching to Docker image of Specmatic for Backward Compatibility Check
Browse files Browse the repository at this point in the history
  • Loading branch information
harikrishnan83 authored May 29, 2024
1 parent f5842f5 commit b5fe838
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/pull_request_merge_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ jobs:
runs-on: ubuntu-latest
name: Check API Contracts
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'

- name: Get changed yaml files
id: changed-files-specific
Expand All @@ -46,14 +40,10 @@ jobs:
run: |
echo "Running Spectral linter on: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
spectral lint in/**/*.yaml
- name: Setup specmatic
uses: airslate-oss/setup-specmatic@v1
with:
specmatic-version: 1.3.16

- name: Run backward compatibility check on changed files
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "Running backward compatibility checks"
specmatic backwardCompatibilityCheck
docker run -v "$(pwd):/central-contract-repo:rw" \ (git)-[BC-command-test]
--entrypoint /bin/sh znsio/specmatic \
-c "cd /central-contract-repo && java -jar /usr/src/app/specmatic.jar backwardCompatibilityCheck"

0 comments on commit b5fe838

Please sign in to comment.