Fix/storage url #53
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Lint | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| swagger: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.2" | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Install and Generate Swagger | |
| run: | | |
| go install github.com/swaggo/swag/v2/cmd/[email protected] | |
| export PATH=$PATH:$(go env GOPATH)/bin | |
| swag init -v3.1 -o docs -g main.go --parseDependency --parseInternal | |
| - name: Upload Swagger Docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: swagger-docs | |
| path: docs/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: swagger | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download Swagger Docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: swagger-docs | |
| path: docs/ | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.2" | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: v1.64.5 | |
| args: --timeout=10m | |
| test: | |
| needs: | |
| - swagger | |
| - lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download Swagger Docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: swagger-docs | |
| path: docs/ | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.2" | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Test | |
| run: go test -v ./... | |
| build: | |
| needs: | |
| - test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Swagger Docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: swagger-docs | |
| path: docs/ | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.24.2" | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Build | |
| run: go build -o bin/server |