Merge pull request #8 from OpenSlides/feature/add-automation #8
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: CI - Build and Test Service | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| continuous-tests-go: | |
| name: Test go | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Configure Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Go Format | |
| run: gofmt -s -w . && git diff --exit-code | |
| - name: Go Build | |
| run: go build ./... | |
| - name: Go Vet | |
| run: go vet ./... | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| - name: Test | |
| run: go test -v -count=1 -race -shuffle=on -coverprofile=coverage.txt -json ./... > test.json | |
| - name: Annotate tests | |
| if: always() | |
| uses: guyarb/golang-test-annotations@v0.8.0 | |
| with: | |
| test-results: test.json |