Add golangci-lint support #116
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: Gotext build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.23 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.23 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| go get -v -u -t -d ./... | |
| - name: Build package | |
| run: go build -v . | |
| - name: Test | |
| run: go test -v -race ./... | |
| - name: Run vet | |
| run: go vet ./... | |
| - name: Run golint | |
| run: go get -u golang.org/x/lint/golint && go install golang.org/x/lint/golint && golint ./... | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.0 | |
| - name: Install xgotext CLI | |
| run: go install -v github.com/leonelquinteros/gotext/cli/xgotext | |
| - name: Run xgotext CLI | |
| run: go run cli/xgotext/main.go -default test -in cli/xgotext/fixtures -out cli/xgotext/fixtures/out | |