From 464be47642d040e88e709ffc9a8f85fe53366496 Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Wed, 24 Sep 2025 19:18:35 +0200 Subject: [PATCH] Separate CI docker and k8s tests (#250) * Separate tests * Update .github/workflows/build.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build.yaml | 47 ++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f58fb53..735410f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,9 +6,45 @@ on: paths-ignore: - '**.md' workflow_dispatch: + jobs: - build: + format-and-lint: + name: Format & Lint Checks runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install + name: Install dependencies + - run: npm run bootstrap + name: Bootstrap the packages + - run: npm run build-all + name: Build packages + - run: npm run format-check + name: Check formatting + - name: Check linter + run: | + npm run lint + git diff --exit-code -- . ':!packages/k8s/tests/test-kind.yaml' + + docker-tests: + name: Docker Hook Tests + runs-on: ubuntu-latest + needs: format-and-lint + steps: + - uses: actions/checkout@v4 + - run: npm install + name: Install dependencies + - run: npm run bootstrap + name: Bootstrap the packages + - run: npm run build-all + name: Build packages + - name: Run Docker tests + run: npm run test --prefix packages/docker + + k8s-tests: + name: Kubernetes Hook Tests + runs-on: ubuntu-latest + needs: format-and-lint steps: - uses: actions/checkout@v4 - run: sed -i "s|{{PATHTOREPO}}|$(pwd)|" packages/k8s/tests/test-kind.yaml @@ -22,10 +58,5 @@ jobs: name: Bootstrap the packages - run: npm run build-all name: Build packages - - run: npm run format-check - - name: Check linter - run: | - npm run lint - git diff --exit-code -- ':!packages/k8s/tests/test-kind.yaml' - - name: Run tests - run: npm run test \ No newline at end of file + - name: Run Kubernetes tests + run: npm run test --prefix packages/k8s \ No newline at end of file