chore: update k8s dependencies in a single PR #165
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
name: checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- main | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install asdf | |
uses: asdf-vm/actions/[email protected] | |
with: | |
asdf_branch: v0.11.2 | |
- name: Gather tool versions | |
uses: endorama/asdf-parse-tool-versions@v1 | |
id: versions | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ fromJson(steps.versions.outputs.tools).golang }} | |
check-latest: false | |
cache: true | |
- name: Run unit tests | |
run: make test | |
env: | |
# This env variable is set automatically by endorama/asdf-parse-tool-versions | |
# and mockery is picking it up. | |
MOCKERY_VERSION: "" | |
- name: Annotate tests | |
if: always() | |
uses: guyarb/[email protected] | |
with: | |
test-results: test.json | |
lint: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Gather tool versions | |
uses: endorama/asdf-parse-tool-versions@v1 | |
id: versions | |
- name: golangci-lint | |
uses: reviewdog/action-golangci-lint@v2 | |
with: | |
fail_on_error: true | |
reporter: github-pr-review | |
go_version: v${{ fromJson(steps.versions.outputs.tools).golang }} | |
golangci_lint_version: v${{ fromJson(steps.versions.outputs.tools).golangci-lint }} | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Gather tool versions | |
uses: endorama/asdf-parse-tool-versions@v1 | |
id: versions | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ fromJson(steps.versions.outputs.tools).golang }} | |
check-latest: false | |
cache: true | |
# - uses: mfinelli/setup-shfmt@v2 | |
# with: | |
# shfmt-version: ${{ fromJson(steps.versions.outputs.tools).shfmt }} | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files --show-diff-on-failure | |
env: | |
SKIP: no-commit-to-branch,golangci-lint |