feat: integrate gin-swagger for API documentation generation #8
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: CI | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| env: | |
| GO_VERSION: '1.25.5' | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run tests | |
| run: go test -v -race ./... | |
| build-api: | |
| name: Build API | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build API Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./deployments/docker/api.Dockerfile | |
| push: false | |
| tags: event-analytics-service-api:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-consumer: | |
| name: Build Consumer | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Consumer Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./deployments/docker/consumer.Dockerfile | |
| push: false | |
| tags: event-analytics-service-consumer:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest |