Skip to content

Commit 9893431

Browse files
author
Michael Vasseur
committed
First setup
Stash the first part Actually use a list Should work?
1 parent 621efcf commit 9893431

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.github/jobs/unit-tests.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ set +e
3838
php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR}/unit-tests.xml --colors=never $pcov > "$ARTIFACTS"/phpunit.out
3939
UNITSUCCESS=$?
4040
set -e
41+
4142
if [ $CODECOVERAGE -eq 1 ]; then
4243
CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
4344
if [ $CNT -gt 32 ]; then

.github/workflows/unit-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,62 @@ jobs:
3131
run: wget https://codecov.io/bash -O newcodecov
3232
- name: Detect changes to manually verify
3333
run: diff newcodecov .github/jobs/uploadcodecov.sh
34+
- name: Run the unit tests
35+
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
36+
#- name: Download latest codecov upload script
37+
# run: wget https://codecov.io/bash -O newcodecov
38+
#- name: Detect changes to manually verify
39+
# run: diff newcodecov .github/jobs/uploadcodecov.sh
40+
#- name: Publish Test Results
41+
# uses: EnricoMi/publish-unit-test-result-action@v2
42+
# if: always()
43+
# with:
44+
# files: |
45+
# test-results/**/*.xml
3446
- name: Upload artifact for debugging
3547
uses: actions/upload-artifact@v3
3648
with:
49+
name: unit-test-output
3750
path: /tmp/artifacts
51+
#.unit_job:
52+
# script:
53+
# - set -eux
54+
# - if [ -z ${PHPVERSION+x} ]; then export PHPVERSION=8.1; fi
55+
# - if [ -z ${TEST+x} ]; then export TEST="UNIT"; fi
56+
# - if [ "$TEST" = "UNIT" ] && [ "$CRAWL_SHADOW_MODE" != "0" ]; then exit 0; fi
57+
# - if [ "$TEST" = "E2E" ] && [ "$CRAWL_SHADOW_MODE" != "0" ] && [ "$CI_COMMIT_BRANCH" != "main" ]; then exit 0; fi
58+
# - export CRAWL_SHADOW_MODE
59+
# - ./gitlab/unit-tests.sh $PHPVERSION $TEST
60+
# artifacts:
61+
# when: always
62+
# paths:
63+
# - unit-tests.xml
64+
# - coverage-html
65+
# - deprecation.txt
66+
# - duration
67+
# - gitlabartifacts
68+
# reports:
69+
# junit:
70+
# - unit-tests.xml
71+
#
72+
#run unit tests:
73+
# only:
74+
# - main
75+
# - /^[0-9].[0-9]$/
76+
# extends: [.mariadb_job,.phpsupported_job,.unit_job]
77+
#
78+
#run unit tests (PR):
79+
# except:
80+
# - main
81+
# - /^[0-9].[0-9]$/
82+
# extends: [.mariadb_job,.phpsupported_job_pr,.unit_job]
83+
#
84+
#run unit tests (MySQL):
85+
# only:
86+
# - main
87+
# - /^[0-9].[0-9]$/
88+
# extends: [.mysql_job,.unit_job]
89+
# parallel:
90+
# matrix:
91+
# - TEST: ["E2E","Unit"]
92+
# CRAWL_SHADOW_MODE: ["0"]

0 commit comments

Comments
 (0)