fix worker test failure: it was due to EOL linux and windows #22
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 - Test and Lint | |
| on: | |
| pull_request: | |
| branches: [ 'main' ] | |
| push: | |
| branches: [ 'main' ] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Path Setup | |
| id: go-paths | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| echo "gomodcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
| echo "gocache=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
| - name: Clone | |
| uses: actions/checkout@v4 | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.go-paths.outputs.gomodcache }} | |
| ${{ steps.go-paths.outputs.gocache }} | |
| key: ${{ runner.os }}-gomodcache-${{ hashFiles('**/go.sum') }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.3' | |
| - name: Run go vet and lint on manager service | |
| run: go fmt ./internal/manager && go vet ./internal/manager | |
| - name: Run go vet and lint on worker service | |
| run: go fmt ./internal/worker && go vet ./internal/worker | |
| - name: Run go test on manager service | |
| run: cd ./internal/manager && go test -v . | |
| - name: Run go test on worker service | |
| run: cd ./internal/worker && go test -v . | |
| # - name: Build manager service | |
| # run: go build -v -o ./bin/manager ./internal/manager | |
| # | |
| # - name: Build worker service | |
| # run: go build -v -o ./bin/worker ./internal/worker |