Skip to content

Commit

Permalink
chore(ZMS): change workflow logic and fix zmsdb
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fink authored and Thomas Fink committed Feb 10, 2025
1 parent bf7dbc0 commit 7109cfd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/combined-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- run: echo "All required checks passed"

combine-coverage:
needs: [call-php-unit-tests] # Only depends on tests
needs: [call-php-unit-tests]
runs-on: ubuntu-latest
steps:
- name: Download all coverage reports
Expand Down
44 changes: 16 additions & 28 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: unit tests

on:
workflow_call:
outputs:
module-test-result:
value: ${{ jobs.module-test.result }}
zmsapi-test-result:
value: ${{ jobs.zmsapi-test.result }}
zmsdb-test-result:
value: ${{ jobs.zmsdb-test.result }}
zmsclient-test-result:
value: ${{ jobs.zmsclient-test.result }}

jobs:
module-test:
Expand Down Expand Up @@ -76,6 +85,9 @@ jobs:
MYSQL_COLLATION: utf8mb4_unicode_ci
ports:
- 3306:3306
command: >-
--innodb-lock-wait-timeout=120
--lock-wait-timeout=120
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
Expand Down Expand Up @@ -134,6 +146,9 @@ jobs:
MYSQL_COLLATION: utf8mb4_unicode_ci
ports:
- 3306:3306
command: >-
--innodb-lock-wait-timeout=120
--lock-wait-timeout=120
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
Expand Down Expand Up @@ -214,31 +229,4 @@ jobs:
with:
name: coverage-zmsclient
path: zmsclient/coverage/
retention-days: 1

combine-coverage:
needs: [module-test, zmsapi-test, zmsdb-test, zmsclient-test]
runs-on: ubuntu-latest
steps:
- name: Download all coverage reports
uses: actions/download-artifact@v4
with:
path: all-coverage
merge-multiple: true

- name: Combine reports
run: |
mkdir -p combined-coverage
for module in zmsadmin zmscalldisplay zmscitizenapi zmsdldb zmsentities zmsmessaging zmsslim zmsstatistic zmsticketprinter zmsapi zmsdb zmsclient; do
if [ -d "all-coverage/coverage-$module" ]; then
mkdir -p "combined-coverage/$module"
cp -r "all-coverage/coverage-$module"/* "combined-coverage/$module/"
fi
done
- name: Upload combined coverage
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: combined-coverage/
retention-days: 7
retention-days: 1

0 comments on commit 7109cfd

Please sign in to comment.