feat: [CS-3] output log to console for promtail to collect #156
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: build and test | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Build All and Test | |
| run: | | |
| for module in common client server; do | |
| echo "Building and testing module: $module" | |
| cd $module | |
| go build -v ./... | |
| go test -v ./... | |
| cd .. | |
| done | |
| lint: | |
| name: Lint(multi-module) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| module: [common, client, server] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 | |
| with: | |
| args: --timeout 5m | |
| working-directory: ${{ matrix.module }} |