Skip to content

Commit

Permalink
tmp: disable everything besides e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorres committed Sep 26, 2024
1 parent 11234a8 commit 224b2b7
Showing 1 changed file with 82 additions and 82 deletions.
164 changes: 82 additions & 82 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
go install github.com/rinchsan/gosimports/cmd/[email protected]
- 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/[email protected]
- 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/[email protected]
# go install github.com/rinchsan/gosimports/cmd/[email protected]
# - 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/[email protected]
# - 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 }}
Expand Down

0 comments on commit 224b2b7

Please sign in to comment.