Modernize build tooling, fix lint and format errors, and add pre-commit hooks #119
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: Lint | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| permissions: | |
| contents: read | |
| # Optional: allow read access to pull request. Use with `only-new-issues` option. | |
| pull-requests: read | |
| jobs: | |
| golangci: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.23.x | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| # Must be specified without patch version: we always use the latest patch version. | |
| version: v2.4 | |
| # Optional: working directory, useful for monorepos | |
| # working-directory: somedir | |
| # Optional: golangci-lint command line arguments. | |
| # Note: By default, the `.golangci.yml` file should be at the root of the repository. | |
| # The config file has more priority than command-line options. | |
| # args: --timeout=30m --config=.golangci.yml | |
| # Optional: show only new issues if it's a pull request. The default value is `false`. | |
| only-new-issues: true | |
| # Optional: if set to true, then all caching functionality will be completely disabled, | |
| # takes precedence over all other caching options. | |
| # skip-cache: true | |
| # Optional: if set to true, then the action won't cache or restore ~/go/pkg. | |
| # skip-pkg-cache: true | |
| # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. | |
| # skip-build-cache: true | |
| # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. | |
| # install-mode: "goinstall" |