Initial setup for golang testing #5
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: Golang Validation | |
| on: | |
| push: | |
| branches: [master, dev] | |
| pull_request: | |
| branches: [master, dev] | |
| jobs: | |
| golang-checks: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [1.24] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Install dependencies | |
| run: | | |
| go mod download | |
| - name: Tidy dependencies | |
| run: | | |
| go mod tidy -diff | |
| - name: Check Format | |
| run: | | |
| gofmt -s -l database logging sse *.go | |
| - name: Run Tests | |
| run: | | |
| go test ./database | |
| - name: Run vet | |
| run: | | |
| go vet ./database/ ./logging/ ./sse/ | |
| go vet *.go |