feat: Modernize project infrastructure and documentation #68
Workflow file for this run
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: reviewdog | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| golangci-lint: | |
| name: runner / golangci-lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.22' | |
| cache: true | |
| - name: Install golangci-lint | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 | |
| - name: Install reviewdog | |
| run: | | |
| curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | |
| - name: Run golangci-lint with reviewdog | |
| env: | |
| REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }} | |
| run: | | |
| $(go env GOPATH)/bin/golangci-lint run --no-config --disable-all --enable=gofmt,govet,errcheck | reviewdog -f=golangci-lint -reporter=github-pr-review -level=info | |
| go-test: | |
| name: runner / go test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.22" | |
| cache: true | |
| - name: Run tests | |
| run: go test -v ./... | |
| misspell: | |
| name: runner / misspell | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.22' | |
| cache: true | |
| - name: Install reviewdog and misspell | |
| run: | | |
| curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | |
| go install github.com/client9/misspell/cmd/misspell@latest | |
| - name: Run misspell with reviewdog | |
| env: | |
| REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }} | |
| run: | | |
| $(go env GOPATH)/bin/misspell -locale US . | $(go env GOPATH)/bin/reviewdog -f=misspell -reporter=github-pr-review -level=info |