Skip to content

Commit d49d234

Browse files
Michael Vasseurvmcj
authored andcommitted
First setup
Stash the first part Actually use a list Should work?
1 parent ecdf2fe commit d49d234

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
@@ -37,7 +37,62 @@ jobs:
3737
run: wget https://codecov.io/bash -O newcodecov
3838
- name: Detect changes to manually verify
3939
run: diff newcodecov .github/jobs/uploadcodecov.sh
40+
- name: Run the unit tests
41+
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
42+
#- name: Download latest codecov upload script
43+
# run: wget https://codecov.io/bash -O newcodecov
44+
#- name: Detect changes to manually verify
45+
# run: diff newcodecov .github/jobs/uploadcodecov.sh
46+
#- name: Publish Test Results
47+
# uses: EnricoMi/publish-unit-test-result-action@v2
48+
# if: always()
49+
# with:
50+
# files: |
51+
# test-results/**/*.xml
4052
- name: Upload artifact for debugging
4153
uses: actions/upload-artifact@v3
4254
with:
55+
name: unit-test-output
4356
path: /tmp/artifacts
57+
#.unit_job:
58+
# script:
59+
# - set -eux
60+
# - if [ -z ${PHPVERSION+x} ]; then export PHPVERSION=8.1; fi
61+
# - if [ -z ${TEST+x} ]; then export TEST="UNIT"; fi
62+
# - if [ "$TEST" = "UNIT" ] && [ "$CRAWL_SHADOW_MODE" != "0" ]; then exit 0; fi
63+
# - if [ "$TEST" = "E2E" ] && [ "$CRAWL_SHADOW_MODE" != "0" ] && [ "$CI_COMMIT_BRANCH" != "main" ]; then exit 0; fi
64+
# - export CRAWL_SHADOW_MODE
65+
# - ./gitlab/unit-tests.sh $PHPVERSION $TEST
66+
# artifacts:
67+
# when: always
68+
# paths:
69+
# - unit-tests.xml
70+
# - coverage-html
71+
# - deprecation.txt
72+
# - duration
73+
# - gitlabartifacts
74+
# reports:
75+
# junit:
76+
# - unit-tests.xml
77+
#
78+
#run unit tests:
79+
# only:
80+
# - main
81+
# - /^[0-9].[0-9]$/
82+
# extends: [.mariadb_job,.phpsupported_job,.unit_job]
83+
#
84+
#run unit tests (PR):
85+
# except:
86+
# - main
87+
# - /^[0-9].[0-9]$/
88+
# extends: [.mariadb_job,.phpsupported_job_pr,.unit_job]
89+
#
90+
#run unit tests (MySQL):
91+
# only:
92+
# - main
93+
# - /^[0-9].[0-9]$/
94+
# extends: [.mysql_job,.unit_job]
95+
# parallel:
96+
# matrix:
97+
# - TEST: ["E2E","Unit"]
98+
# CRAWL_SHADOW_MODE: ["0"]

0 commit comments

Comments
 (0)