chore(deps): bump kubewarden/runtime-enforcer/.github/actions/merge-multiarch from 7dbcde44b88775df0c68d9f16301825f82c6cd51 to 84d70cdf10413998a6d62cb5d3d0bea35ea3cbc5 #773
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: ["main"] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y pip | |
| pip install pre-commit | |
| - name: Cache precommit linters | |
| id: cache-precommit-linters | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cache/pre-commit/ | |
| key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Install linters | |
| run: | | |
| pre-commit install --install-hooks | |
| - name: Run linters | |
| run: | | |
| pre-commit run --show-diff-on-failure --color=always --all-files | |
| test: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Running Tests | |
| run: | | |
| go mod tidy | |
| make test | |
| verify-generated-code: | |
| name: Verify generated code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Generate files | |
| run: make generate | |
| - name: Check working tree is clean | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "generated files are not up to date. Run: make generate" | |
| echo "" | |
| echo "Diff:" | |
| git --no-pager diff | |
| exit 1 | |
| fi | |
| helm-unit-test: | |
| name: Helm unit test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 | |
| with: | |
| version: v3.19.0 | |
| - name: Install Helm-unittest | |
| # Pin version to 1.0.2 due to https://github.com/helm-unittest/helm-unittest/issues/790 | |
| run: helm plugin install https://github.com/helm-unittest/helm-unittest --version 1.0.2 | |
| - run: make helm-unit-test | |
| commitlint: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| env: | |
| COMMITLINT_VERSION: "20.5.0" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Cache commitlint | |
| id: cache-commitlint | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| node_modules | |
| package.json | |
| package-lock.json | |
| key: ${{ runner.os }}-commitlint-${{ env.COMMITLINT_VERSION }} | |
| - name: Install commitlint | |
| if: steps.cache-commitlint.outputs.cache-hit != 'true' | |
| run: npm install -D @commitlint/cli@${{ env.COMMITLINT_VERSION }} @commitlint/config-conventional@${{ env.COMMITLINT_VERSION }} | |
| - name: Print versions | |
| run: | | |
| git --version | |
| node --version | |
| npm --version | |
| npx commitlint --version | |
| - name: Validate PR commits with commitlint | |
| run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |