diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml index d35380708..ae99c99c2 100644 --- a/.github/workflows/build-test-deploy.yaml +++ b/.github/workflows/build-test-deploy.yaml @@ -27,25 +27,6 @@ jobs: - name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass. run: exit 1 - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: "1.22" - - name: setup env - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - shell: bash - - name: Run linters - run: make install-golangci-lint lint - - name: Run tests - run: make test - test-integration: runs-on: ubuntu-latest steps: @@ -63,8 +44,8 @@ jobs: - uses: replicatedhq/action-k3s@main id: k3s with: - version: v1.24.1-k3s1 - + version: v1.31.2+k3s1 + # test-integration includes unit tests - run: make test-integration ensure-schemas-are-generated: @@ -104,54 +85,6 @@ jobs: name: preflight path: bin/preflight - validate-preflight: - runs-on: ubuntu-latest - needs: compile-preflight - steps: - - uses: replicatedhq/action-k3s@main - id: k3s - with: - version: v1.23.6-k3s1 - - name: Download preflight binary - uses: actions/download-artifact@v4 - with: - name: preflight - path: bin/ - - run: chmod +x bin/preflight - - run: | - set +e - ./bin/preflight --interactive=false --format=json https://preflight.replicated.com > result.json - EXIT_CODE=$? - cat result.json - - EXIT_STATUS=0 - if [ $EXIT_CODE -ne 3 ]; then - echo "Expected exit code of 3 (some checks failed), got $EXIT_CODE" - EXIT_STATUS=1 - fi - - if grep -q "was not collected" result.json; then - echo "Some files were not collected" - EXIT_STATUS=1 - fi - - if (( `jq '.pass | length' result.json` < 1 )); then - echo "No passing preflights found" - EXIT_STATUS=1 - fi - - if (( `jq '.warn | length' result.json` < 1 )); then - echo "No warnings found" - EXIT_STATUS=1 - fi - - if (( `jq '.fail | length' result.json` < 1 )); then - echo "No failed preflights found" - EXIT_STATUS=1 - fi - - exit $EXIT_STATUS - validate-preflight-e2e: runs-on: ubuntu-latest needs: compile-preflight @@ -193,25 +126,6 @@ jobs: name: support-bundle path: bin/support-bundle - validate-supportbundle: - runs-on: ubuntu-latest - needs: compile-supportbundle - steps: - - uses: actions/checkout@v4 - - uses: replicatedhq/action-k3s@main - id: k3s - with: - version: v1.23.6-k3s1 - - name: Download support-bundle binary - uses: actions/download-artifact@v4 - with: - name: support-bundle - path: bin/ - - run: chmod +x bin/support-bundle - - run: ./bin/support-bundle ./examples/support-bundle/sample-collectors.yaml - - run: ./bin/support-bundle ./examples/support-bundle/sample-supportbundle.yaml - - run: ./bin/support-bundle https://kots.io - validate-supportbundle-e2e: runs-on: ubuntu-latest needs: compile-supportbundle @@ -220,7 +134,7 @@ jobs: - uses: replicatedhq/action-k3s@main id: k3s with: - version: v1.23.6-k3s1 + version: v1.31.2+k3s1 - name: Download support bundle binary uses: actions/download-artifact@v4 with: @@ -228,26 +142,6 @@ jobs: path: bin/ - run: chmod +x bin/support-bundle - run: make support-bundle-e2e-test - - validate-supportbundle-e2e-go-test: - runs-on: ubuntu-latest - needs: compile-supportbundle - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.22" - - name: setup env - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - shell: bash - - uses: actions/checkout@v4 - - name: Download support bundle binary - uses: actions/download-artifact@v4 - with: - name: support-bundle - path: bin/ - - run: chmod +x bin/support-bundle - run: make support-bundle-e2e-go-test compile-collect: diff --git a/Makefile b/Makefile index 391daa8ad..d8bc91d5a 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ test: generate fmt vet # TODOLATER: merge with test, so we get unified coverage reports? it'll add 21~sec to the test job though... .PHONY: test-integration test-integration: - go test -v --tags "integration exclude_graphdriver_devicemapper exclude_graphdriver_btrfs" ${BUILDPATHS} + go test -v --tags="integration exclude_graphdriver_devicemapper exclude_graphdriver_btrfs" ${BUILDPATHS} .PHONY: preflight-e2e-test preflight-e2e-test: @@ -237,18 +237,6 @@ scan: --ignore-unfixed \ ./ -.PHONY: lint -lint: vet - golangci-lint run --new -c .golangci.yaml --build-tags ${BUILDTAGS} ${BUILDPATHS} - -.PHONY: lint-and-fix -lint-and-fix: fmt vet - golangci-lint run --new --fix -c .golangci.yaml --build-tags ${BUILDTAGS} ${BUILDPATHS} - -.PHONY: install-golangci-lint -install-golangci-lint: - go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} - .PHONY: watch watch: npm-install bin/watch.js