Skip to content

Commit 635b90b

Browse files
authored
Merge pull request #1202 from Ilyesbdlala/bugfix/ci-unit-tests
Added running unit-tests step to hooks ci steps
2 parents f75984c + 67329fc commit 635b90b

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ jobs:
150150
path: ./${{ matrix.sdk }}/nodejs/${{ matrix.sdk }}.tar
151151
retention-days: 1
152152

153-
# ---- New Makefile based CI Pipeline steps ----
153+
# ---- Test | Scanners ----
154154

155-
Integration-test-scanner:
156-
name: "Make Scanners"
155+
test-scanners:
156+
name: "Test | Scanner ${{ matrix.unit }}"
157157
needs:
158158
- sdk
159159
- operator
@@ -422,10 +422,10 @@ jobs:
422422
echo "Operator Startup Logs"
423423
kubectl -n securecodebox-system logs deployment/securecodebox-controller-manager
424424
425-
# ---- Integration Tests ----
425+
# ---- Test | Hooks ----
426426

427-
Integration-tests-hooks:
428-
name: Integration Tests Hook ${{ matrix.hook }} | k8s ${{ matrix.k8sVersion }}
427+
test-hooks:
428+
name: Test | Hook ${{ matrix.hook }} | k8s ${{ matrix.k8sVersion }}
429429
needs:
430430
- operator
431431
runs-on: ubuntu-20.04
@@ -560,6 +560,12 @@ jobs:
560560
working-directory: ./tests/integration
561561
run: npm ci
562562

563+
# ---- Unit-Test ----
564+
565+
- name: "Run Unit Tests"
566+
working-directory: ./hooks/${{ matrix.hook }}
567+
run: make unit-tests
568+
563569
# ---- Integration-Test ----
564570

565571
- name: Deploy ${{ matrix.hook }}

‎common.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ install-deps-js:
9494

9595
unit-test-js: install-deps-js
9696
@echo ".: 🧪 Starting unit-tests for '$(name)' $(module) with 'jest@$(JEST_VERSION)'."
97-
npx --yes --package jest@$(JEST_VERSION) jest --ci --colors --coverage --passWithNoTests ${name}/${module}/
97+
npx --yes --package jest@$(JEST_VERSION) jest --ci --colors --coverage --passWithNoTests ${name}/${module}/ --testPathIgnorePatterns /integration-tests/
9898

9999
install-deps-py:
100100
@echo ".: ⚙️ Installing all $(module) specific python dependencies."

0 commit comments

Comments
 (0)