Skip to content

Commit

Permalink
installing swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 11, 2023
1 parent 34846b7 commit 02f08b2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.6

- name: golangci-lint
run: golangci-lint run --timeout=30m --max-same-issues=0 --out-format=github-actions
run: golangci-lint run --timeout=30m --max-same-issues=0 --out-format=github-actions --new

# Add legacy checks since golangci-lint only tests changed files for now
- name: StaticCheck
Expand All @@ -43,7 +43,7 @@ jobs:
run: go test -cover `go list ./... | grep -v 'pkg/client'`

test-swagger:
name: Test
name: Test Swagger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -53,7 +53,11 @@ jobs:
- name: Install dependencies
run: go mod download
- name: Install Swagger
run: go get -u github.com/go-swagger/go-swagger/cmd/swagger
run: |
download_url=$(curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \
jq -r '.assets[] | select(.name | contains("'"$(uname | tr '[:upper:]' '[:lower:]')"'_amd64")) | .browser_download_url')
curl -o /usr/local/bin/swagger -L'#' "$download_url"
chmod +x /usr/local/bin/swagger
- name: Run Tests
run: make swagger
- name: Validate no changes
Expand Down

0 comments on commit 02f08b2

Please sign in to comment.