From c3972110050015ec2910688810b31a5efd78a489 Mon Sep 17 00:00:00 2001 From: facchettos Date: Fri, 9 Feb 2024 11:41:20 +0100 Subject: [PATCH] f --- .github/workflows/matrix.yaml | 26 +++++++++------ .github/workflows/unit-tests-2.yaml | 49 ----------------------------- 2 files changed, 17 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/unit-tests-2.yaml diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 1eda22a15..afe8d5ed0 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -1,4 +1,4 @@ -name: Compatibility Matrix +name: Matric compat on: release: @@ -6,21 +6,30 @@ on: pull_request: branches: - main + paths: + - "**.go" + - "!test/**" # exclude changes in e2e tests + - ".github/workflows/unit-tests.yaml" + - "hack/test.sh" + - "charts/**" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: - check-if-matrix-is-up-to-date: - name: matrix job - runs-on: ubuntu-latest + name: Execute all go tests + runs-on: ubuntu-22.04 steps: - - name: Checkout + - name: Set up Go 1.21 + uses: actions/setup-go@v5 + with: + go-version: "1.21" + cache: false + - name: Check out code into the Go module directory uses: actions/checkout@v4 - - name: regenerate the table - run: | - go run hack/compat-matrix/main.go docs/pages/deploying-vclusters/compat-matrix + - name: Execute unit tests + run: go run hack/compat-matrix/main.go docs/pages/deploying-vclusters/compat-matrix.mdx - name: commit change if needed run: | git diff --quiet && git diff --staged --quiet || git commit -am 'updated compatibility matrix' @@ -28,4 +37,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TO:KEN }} run: git push - diff --git a/.github/workflows/unit-tests-2.yaml b/.github/workflows/unit-tests-2.yaml deleted file mode 100644 index 090b6f27f..000000000 --- a/.github/workflows/unit-tests-2.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: Unit tests copy - -on: - release: - types: [created] - pull_request: - branches: - - main - paths: - - "**.go" - - "!test/**" # exclude changes in e2e tests - - ".github/workflows/unit-tests.yaml" - - "hack/test.sh" - - "charts/**" - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - helm-unit-tests: - name: Execute all helm tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Helm Unit Test Plugin - run: | - helm plugin install https://github.com/helm-unittest/helm-unittest - - name: Run Helm Unit Tests - run: | - helm unittest charts/eks -d - helm unittest charts/k3s -d - helm unittest charts/k0s -d - helm unittest charts/k8s -d - - go-unit-test: - name: Execute all go tests - runs-on: ubuntu-22.04 - steps: - - name: Set up Go 1.21 - uses: actions/setup-go@v5 - with: - go-version: "1.21" - cache: false - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: Execute unit tests - run: ./hack/test.sh