Skip to content

Commit

Permalink
Merge pull request #2 from bancodobrasil/fix/swagger
Browse files Browse the repository at this point in the history
Fix/swagger
  • Loading branch information
ralphg6 authored Mar 7, 2023
2 parents c92af1c + 337c984 commit 167b7fb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 866 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
config.yaml
.github/
.vscode/
dev.sh
dev.sh
/docs
27 changes: 16 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,23 @@ jobs:

- name: "Fetch dependencies"
run: go mod download

# Only run gofmt, vet & lint against the latest Go version
- name: "Run golint"
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}}
run: |
go install golang.org/x/lint/golint@latest
golint -set_exit_status $1 ./...
exit $1

- name: "Run gofmt"
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}}
run: diff -u <(echo -n) <(gofmt -d -e .)
- name: "Generate Swagger"
run: |
go install github.com/swaggo/swag/cmd/[email protected]
swag i
# # Only run gofmt, vet & lint against the latest Go version
# - name: "Run golint"
# if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}}
# run: |
# go install golang.org/x/lint/golint@latest
# golint -set_exit_status $1 ./...
# exit $1

# - name: "Run gofmt"
# if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}}
# run: diff -u <(echo -n) <(gofmt -d -e .)

- name: "Run go vet"
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ vendor
_data/*
!.gitkeep
__debug_bin
/docs
.DS_Store
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ COPY go.sum /app

RUN go mod download

RUN go install github.com/swaggo/swag/cmd/[email protected]

COPY . /app

RUN swag i

RUN go build -o jamie-service

FROM alpine:3.17
Expand Down
Loading

0 comments on commit 167b7fb

Please sign in to comment.