Merge pull request #426 from robertohueso/single-signature-docs #627
  
    
      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: validate | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: read-all | |
| env: | |
| LINT_VERSION: v2.5.0 | |
| jobs: | |
| codespell: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: install deps | |
| # Version of codespell bundled with Ubuntu is way old, so use pip. | |
| run: pip install --break-system-packages codespell==v2.4.1 | |
| - name: run codespell | |
| run: make codespell | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: ./common | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25.x | |
| # By default the go cache will only use go.sum in the root which we don't have, | |
| # make it use for all checksum files. | |
| # https://github.com/actions/setup-go?tab=readme-ov-file#caching-dependency-files-and-build-outputs | |
| cache-dependency-path: "**/go.sum" | |
| - name: install deps | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get -qq install libseccomp-dev libgpgme-dev libbtrfs-dev libsubid-dev | |
| - name: lint-common | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: "${{ env.LINT_VERSION }}" | |
| args: --verbose | |
| working-directory: ./common | |
| - name: lint-image | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: "${{ env.LINT_VERSION }}" | |
| args: --verbose | |
| working-directory: ./image | |
| - name: lint-storage | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: "${{ env.LINT_VERSION }}" | |
| args: --verbose | |
| working-directory: ./storage | |
| - name: validate seccomp | |
| run: ./tools/validate_seccomp.sh ./pkg/seccomp | |
| git-validate: | |
| # only run this on PRs | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| env: | |
| GIT_CHECK_EXCLUDE: "./vendor" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| # By default github actions creates a merge commit which fails the validation, | |
| # we only must validate the actual commits of the author. | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: ${{ github.event.pull_request.commits }} | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25.x | |
| # See comment on lint task | |
| cache-dependency-path: "**/go.sum" | |
| - name: run git-validation | |
| # We validate all commits as we only fetched the number of commits in the PR above, | |
| # by default git-validation has some special github action handling but that seems broken. | |
| run: make .install.gitvalidation && git-validation -no-github | |
| go-vendor: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25.x | |
| # See comment on lint task | |
| cache-dependency-path: "**/go.sum" | |
| - name: vendor | |
| run: make vendor | |
| - name: check if tree is clean | |
| run: hack/tree_status.sh |