diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d6fe197c..8d85b221 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -8,93 +8,93 @@ on: # remove CI_RUNNER_DEBUG_SSH_PUBLIC_KEY # jobs: - lint: - concurrency: - group: lint-golangci-${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup-go - uses: actions/setup-go@v3 - with: - go-version: '1.20' - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: v1.52.2 - code-format-check: - concurrency: - group: lint-autoformat-${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup-go - uses: actions/setup-go@v3 - with: - go-version: '1.20' - - name: Install utilities - run: | - go install mvdan.cc/gofumpt@v0.5.0 - go install github.com/rinchsan/gosimports/cmd/gosimports@v0.3.8 - - name: format all files with auto-formatter - run: bash ./.github/scripts/format-all-go-code.sh "$PWD" - - name: Check repository diff - run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken" - run-unit-tests: - concurrency: - group: run-unit-tests-${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - # needs: - # - lint - # - code-format-check - runs-on: ubuntu-latest - outputs: - result: ${{ steps.run-unit-tests.outputs.result }} - steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup-go - uses: actions/setup-go@v3 - with: - go-version: '1.20' - - name: setup-medium-test-class-binaries - run: | - # This installs kube-apiserver and etcd binaries for `medium` - # class tests. Refer to the writing tests docs for more info. - make envtest - KUBEBUILDER_ASSETS=$(./bin/setup-envtest use 1.26 -p path) - echo "KUBEBUILDER_ASSETS=$KUBEBUILDER_ASSETS" >> $GITHUB_ENV - - name: setup-gotestsum - run: | - go install gotest.tools/gotestsum@v1.12.0 - - name: run-unit-tests - id: run-unit-tests - run: | - gotestsum --format pkgname --jsonfile log.json -- -v -timeout 900s -p 1 ./internal/... -ginkgo.vv -coverprofile cover.out - - name: convert-to-human-readable - run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true - - name: artifact-upload-step - uses: actions/upload-artifact@v4 - id: artifact-upload-step - if: always() - with: - name: unit-tests-log - path: log.txt - if-no-files-found: error - - name: echo-tests-log-url - run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' + # lint: + # concurrency: + # group: lint-golangci-${{ github.head_ref || github.ref_name }} + # cancel-in-progress: true + # runs-on: ubuntu-latest + # steps: + # - name: checkout + # uses: actions/checkout@v3 + # - name: setup-go + # uses: actions/setup-go@v3 + # with: + # go-version: '1.20' + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v2 + # with: + # version: v1.52.2 + # code-format-check: + # concurrency: + # group: lint-autoformat-${{ github.head_ref || github.ref_name }} + # cancel-in-progress: true + # runs-on: ubuntu-latest + # steps: + # - name: checkout + # uses: actions/checkout@v3 + # - name: setup-go + # uses: actions/setup-go@v3 + # with: + # go-version: '1.20' + # - name: Install utilities + # run: | + # go install mvdan.cc/gofumpt@v0.5.0 + # go install github.com/rinchsan/gosimports/cmd/gosimports@v0.3.8 + # - name: format all files with auto-formatter + # run: bash ./.github/scripts/format-all-go-code.sh "$PWD" + # - name: Check repository diff + # run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken" + # run-unit-tests: + # concurrency: + # group: run-unit-tests-${{ github.head_ref || github.ref_name }} + # cancel-in-progress: true + # needs: + # - lint + # - code-format-check + # runs-on: ubuntu-latest + # outputs: + # result: ${{ steps.run-unit-tests.outputs.result }} + # steps: + # - name: checkout + # uses: actions/checkout@v3 + # - name: setup-go + # uses: actions/setup-go@v3 + # with: + # go-version: '1.20' + # - name: setup-medium-test-class-binaries + # run: | + # # This installs kube-apiserver and etcd binaries for `medium` + # # class tests. Refer to the writing tests docs for more info. + # make envtest + # KUBEBUILDER_ASSETS=$(./bin/setup-envtest use 1.26 -p path) + # echo "KUBEBUILDER_ASSETS=$KUBEBUILDER_ASSETS" >> $GITHUB_ENV + # - name: setup-gotestsum + # run: | + # go install gotest.tools/gotestsum@v1.12.0 + # - name: run-unit-tests + # id: run-unit-tests + # run: | + # gotestsum --format pkgname --jsonfile log.json -- -v -timeout 900s -p 1 ./internal/... -ginkgo.vv -coverprofile cover.out + # - name: convert-to-human-readable + # run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true + # - name: artifact-upload-step + # uses: actions/upload-artifact@v4 + # id: artifact-upload-step + # if: always() + # with: + # name: unit-tests-log + # path: log.txt + # if-no-files-found: error + # - name: echo-tests-log-url + # run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' run-e2e-tests: concurrency: group: run-e2e-tests-${{ github.head_ref || github.ref_name }} cancel-in-progress: true needs: - - lint - - code-format-check - - run-unit-tests + # - lint + # - code-format-check + # - run-unit-tests runs-on: ubuntu-latest outputs: result: ${{ steps.run-e2e-tests.outputs.result }}