feat: introduce StrictConflicts setting to optionally enforce file ow… #620
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: Go | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| check-latest: true | |
| - name: Format | |
| run: | | |
| out=$(gofmt -d $(go list -f {{.Dir}} ./...)) | |
| if [[ -n $out ]]; then | |
| echo "Go code is not formatted:" | |
| gofmt -d $(go list -f {{.Dir}} ./...) | |
| exit 1 | |
| fi | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v -race ./... | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| check-latest: true | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v ./... |