[FFS-4303] Make RegisterRoutes only wire HTTP paths to handlers. #117
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: PR Verification | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "**/*.go" | |
| - ".golangci.yml" | |
| - "go.mod" | |
| - "go.sum" | |
| jobs: | |
| unit: | |
| name: test | |
| runs-on: "codebuild-emmy-github-runner-emmy-api-${{ github.run_id }}-${{ github.run_attempt }}" | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v6 | |
| - name: Start Redis | |
| run: | | |
| docker network create emmy-net | |
| docker run -d --name redis --network emmy-net redis:7-alpine | |
| # Wait for redis to be ready | |
| for i in {1..10}; do | |
| if docker exec redis redis-cli ping | grep -q PONG; then | |
| echo "Redis is ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for Redis..." | |
| sleep 2 | |
| done | |
| echo "Redis failed to start" | |
| exit 1 | |
| - name: Build Test Image | |
| run: docker build -t emmy-test -f Dockerfile.test . | |
| - name: Test | |
| run: | | |
| docker run --rm \ | |
| --network emmy-net \ | |
| -e REDIS_ADDR=redis:6379 \ | |
| emmy-test | |
| golangci: | |
| name: lint | |
| runs-on: "codebuild-emmy-github-runner-emmy-api-${{ github.run_id }}-${{ github.run_attempt }}" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.x" | |
| cache: false | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.5.0 | |
| install-mode: goinstall | |
| only-new-issues: true |