tools: use Go 1.24 tool dependency mechanism, run linter with GH action #376
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: CI | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "*" | |
| concurrency: | |
| # Cancel any previous workflows if they are from a PR or push. | |
| group: ${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| GO_VERSION: 1.24.10 | |
| jobs: | |
| ######################## | |
| # lint code | |
| ######################## | |
| lint: | |
| name: lint code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: git checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.6.2 | |
| ######################## | |
| # run unit tests | |
| ######################## | |
| unit-test: | |
| name: run unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: git checkout | |
| uses: actions/checkout@v5 | |
| - name: setup go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '${{ env.GO_VERSION }}' | |
| - name: Install chantools | |
| run: make install | |
| - name: run unit tests | |
| run: make unit | |
| ######################## | |
| # run integration tests | |
| ######################## | |
| integration-test: | |
| name: run integration tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: git checkout | |
| uses: actions/checkout@v5 | |
| - name: setup go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '${{ env.GO_VERSION }}' | |
| - name: Install chantools | |
| run: make install | |
| - name: run integration tests | |
| run: make itest |