new file: .forgejo/workflows/run-tests.sh
Some checks failed
Testing / test (push) Failing after 44s
Some checks failed
Testing / test (push) Failing after 44s
modified: .forgejo/workflows/test.yml
This commit is contained in:
parent
ab50b172f6
commit
cd75367045
2 changed files with 21 additions and 2 deletions
19
.forgejo/workflows/run-tests.sh
Normal file
19
.forgejo/workflows/run-tests.sh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Run the tests and capture the output
|
||||||
|
npm run test:unit > test-output.log 2>&1
|
||||||
|
|
||||||
|
# Check if 'No tests found' is in the log
|
||||||
|
if grep -q 'No tests found' test-output.log; then
|
||||||
|
echo "No tests found. Exiting with status 0."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
# Check if the test run was successful
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Tests executed successfully."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Tests failed. Exiting with status 1."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -24,8 +24,8 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run Unit tests
|
- name: Run Unit tests
|
||||||
run: npm run test:unit
|
run: ./.forgejo/workflows/run-tests.sh
|
||||||
|
|
||||||
- name: Run E2E tests
|
- name: Run E2E tests
|
||||||
run: npm run test:e2e
|
run: npm run test:e2e
|
Loading…
Add table
Reference in a new issue