Syncing latest changes from upstream main for kubernetes-csi-addons #252
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: Run Golang tests | |
# yamllint disable-line rule:truthy | |
on: | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
make_test: | |
name: make_test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install Protoc | |
# action @v1.3.0 can install protoc 3.19, @v2 installs protoc v21.0+ | |
uses: arduino/setup-protoc@v1.3.0 | |
with: | |
version: "3.20.2" | |
- name: Run "make test" | |
run: make test | |
- name: Check for uncommitted changes | |
run: make check-all-committed | |
- name: Show the uncommitted "git diff" | |
if: ${{ failure() }} | |
run: git diff ; false | |
go_mod_verify: | |
name: go_mod_verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Verify Go modules | |
run: go mod verify | |
go_mod_vendor: | |
name: go_mod_vendor | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Vendor all dependencies | |
run: go mod vendor | |
- name: Check for uncommitted changes | |
run: make check-all-committed |