Skip to content

Commit

Permalink
always check breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 11, 2023
1 parent ddbf56f commit c08f8c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: '1.21'
Expand All @@ -57,14 +55,14 @@ jobs:
- name: Install Swagger
run: go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5
- name: Generate Swagger
run: make swagger
run: swagger generate spec -o ./swagger.json --scan-models --exclude-deps
- name: Validate no changes
run: git diff --exit-code ./swaggerui/html/swagger.json
run: diff swagger.json ./swaggerui/html/swagger.json
- name: Check breaking changes
if: always()
id: breaking
continue-on-error: true
run: swagger diff --break <(git show HEAD~1:swaggerui/html/swagger.json --quiet) ./swaggerui/html/swagger.json > swagger_breaking_changes.txt
run: swagger diff --break ./swaggerui/html/swagger.json swagger.json > swagger_breaking_changes.txt
- name: Add comment
if: failure() && steps.breaking.outcome == 'failure'
uses: mshick/add-pr-comment@v2
Expand Down
13 changes: 11 additions & 2 deletions swaggerui/html/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7267,7 +7267,16 @@
},
"status": {
"description": "Status of the step",
"type": "number",
"type": "string",
"enum": [
"Queued",
"Waiting",
"Running",
"Succeeded",
"Failed",
"Stopped",
"StoppedNoChanges"
],
"x-go-name": "Status",
"example": "Waiting"
}
Expand Down Expand Up @@ -7384,4 +7393,4 @@
"bearer": []
}
]
}
}

0 comments on commit c08f8c0

Please sign in to comment.