| 1 | name: build |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | |
| 8 | jobs: |
| 9 | test: |
| 10 | name: Test with Coverage |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - name: Set up Go |
| 14 | uses: actions/setup-go@v4 |
| 15 | with: |
| 16 | go-version: '1.24.x' |
| 17 | - name: Check out code |
| 18 | uses: actions/checkout@v4 |
| 19 | - name: Install dependencies |
| 20 | run: | |
| 21 | go mod download |
| 22 | - name: Run Unit tests |
| 23 | run: | |
| 24 | go test -race -covermode atomic -coverprofile=covprofile ./... |
| 25 | - name: Install goveralls |
| 26 | run: go install github.com/mattn/goveralls@latest |
| 27 | - name: Send coverage |
| 28 | env: |
| 29 | COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 30 | run: goveralls -coverprofile=covprofile -service=github |
| 31 | build: |
| 32 | runs-on: ubuntu-latest |
| 33 | steps: |
| 34 | - name: checkout |
| 35 | uses: actions/checkout@v4 |
| 36 | - name: Setup Go 1.24.x |
| 37 | uses: actions/setup-go@v4 |
| 38 | with: |
| 39 | go-version: '1.24.x' |
| 40 | - name: Build |
| 41 | run: go build -v ./... |