Feat: Add github workflow for unit-test on push to any branch #1
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: unit-tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| - name: Run Unit Tests | |
| run: | | |
| go clean -testcache && go test -v ./... -coverprofile=coverage.out | |
| go tool cover -func=coverage.out | |
| go tool cover -html=coverage.out -o coverage.html |