Check formatting in CI #1550
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| buildWindows: | |
| name: Build Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.23 | |
| id: go | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Format | |
| run: | | |
| go fmt ./... | |
| git diff --exit-code | |
| - name: Test | |
| run: go test ./... | |
| build: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.23 | |
| id: go | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Format | |
| run: | | |
| go fmt ./... | |
| git diff --exit-code | |
| - name: Test | |
| run: go test ./... | |
| - name: Coverage | |
| run: go test -v -coverprofile=coverage.out ./... | |
| - uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.out | |
| flags: unittests | |
| fail_ci_if_error: false | |
| verbose: true |