Chore: upgrades Go (1.23.8) and K8s (1.31.0) versions #639
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: Unit Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release-* | |
| tags: | |
| - v* | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: | |
| - master | |
| - release-* | |
| env: | |
| # Common versions | |
| GO_VERSION: '1.23.8' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v1 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - uses: actions/checkout@v2 | |
| - name: golangci-lint | |
| run: | | |
| make lint | |
| unit-tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v1 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Cache Go Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .work/pkg | |
| key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | |
| restore-keys: ${{ runner.os }}-pkg- | |
| - name: Install Kubebuilder | |
| run: | | |
| wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.2/kubebuilder_2.3.2_linux_amd64.tar.gz | |
| tar -zxf kubebuilder_2.3.2_linux_amd64.tar.gz | |
| sudo mv kubebuilder_2.3.2_linux_amd64 /usr/local/kubebuilder | |
| - name: Run Make test | |
| run: make test | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@v2 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./ut-coverage1.xml | |
| flags: unit |