build(deps): Bump k8s.io/apimachinery from 0.31.1 to 0.31.2 in the all-go-mod-patch-and-minor group across 1 directory #1672
Workflow file for this run
This file contains 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
# Copyright 2021 D2iQ, Inc. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
unit-test: | |
runs-on: ubuntu-22.04 | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0 | |
with: | |
enable-cache: true | |
- name: Go cache | |
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run unit tests | |
run: devbox run -- task test:unit | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2 | |
if: always() | |
with: | |
check_name: "Unit test results" | |
files: | | |
junit-report.xml | |
e2e-test: | |
runs-on: ubuntu-22.04 | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0 | |
with: | |
enable-cache: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
with: | |
platforms: arm64 | |
- name: Run e2e tests | |
run: devbox run -- task test:e2e | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TMPDIR: ${{ runner.temp }} | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2 | |
if: always() | |
with: | |
check_name: "e2e test results" | |
files: | | |
junit-e2e.xml | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0 | |
with: | |
enable-cache: true | |
- name: Export golang and golangci-lint versions | |
id: versions | |
run: | | |
echo "golangci-lint=$(devbox run -- golangci-lint version --format short)" >>"${GITHUB_OUTPUT}" | |
echo "golang=$(devbox run -- go version | grep -o "[[:digit:]]\+.[[:digit:]]\+\(.[[:digit:]]\+\)\?")" >>"${GITHUB_OUTPUT}" | |
- name: golangci-lint | |
uses: reviewdog/action-golangci-lint@7708105983c614f7a2725e2172908b7709d1c3e4 # v2 | |
with: | |
fail_on_error: true | |
reporter: github-pr-review | |
golangci_lint_version: v${{ steps.versions.outputs.golangci-lint }} | |
go_version: v${{ steps.versions.outputs.golang }} | |
lint-gha: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: actionlint | |
uses: reviewdog/action-actionlint@6bd00ab832c9b5d4873f40a8b0c9501ac2df1b29 # v1 | |
with: | |
fail_on_error: true | |
reporter: github-pr-review | |
pre-commit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0 | |
with: | |
enable-cache: true | |
- name: Go cache | |
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Set up pre-commit cache | |
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit | |
run: devbox run -- task pre-commit:run | |
env: | |
SKIP: no-commit-to-branch,golangci-lint,actionlint-system | |
govulncheck: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0 | |
with: | |
enable-cache: true | |
- id: govulncheck | |
run: devbox run -- task go:vulncheck |