chore(ZMS): change workflow logic and fix zmsdb #3724
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Combined Workflow | |
on: [push] | |
jobs: | |
call-php-code-quality: | |
uses: ./.github/workflows/php-code-quality.yaml | |
call-php-unit-tests: | |
uses: ./.github/workflows/unit-tests.yaml | |
check-and-proceed: | |
needs: [call-php-code-quality, call-php-unit-tests] | |
runs-on: ubuntu-latest | |
if: | | |
always() && | |
needs.call-php-code-quality.result == 'success' && | |
needs.call-php-unit-tests.outputs.module-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsapi-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsdb-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsclient-test-result == 'success' | |
steps: | |
- run: echo "All required checks passed" | |
combine-coverage: | |
needs: [call-php-unit-tests] | |
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 | |
call-build-images: | |
needs: check-and-proceed | |
if: | | |
always() && | |
needs.call-php-unit-tests.outputs.module-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsapi-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsdb-test-result == 'success' && | |
needs.call-php-unit-tests.outputs.zmsclient-test-result == 'success' && | |
needs.call-php-code-quality.result == 'success' | |
uses: ./.github/workflows/build-images.yaml |