Updated github_ci.yml.tpl
This commit is contained in:
parent
093e3341e1
commit
2a20786755
1 changed files with 19 additions and 15 deletions
|
@ -59,29 +59,33 @@ jobs:
|
||||||
name: %ASSEMBLY.NAME%_build
|
name: %ASSEMBLY.NAME%_build
|
||||||
path: build/release/%ASSEMBLY.PACKAGE%.ncc
|
path: build/release/%ASSEMBLY.PACKAGE%.ncc
|
||||||
|
|
||||||
|
check-phpunit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
phpunit-exists: ${{ steps.check.outputs.phpunit-exists }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Check for phpunit.xml
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
if [ -f phpunit.xml ]; then
|
||||||
|
echo "phpunit-exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "phpunit-exists=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
test:
|
test:
|
||||||
needs: build
|
needs: [build, check-phpunit]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: php:8.3
|
image: php:8.3
|
||||||
|
if: needs.check-phpunit.outputs.phpunit-exists == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check for phpunit.xml
|
|
||||||
id: file_check
|
|
||||||
run: |
|
|
||||||
if [ -f phpunit.xml ]; then
|
|
||||||
echo "::set-output name=exists::true"
|
|
||||||
else
|
|
||||||
echo "::set-output name=exists::false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Skip if no phpunit.xml
|
|
||||||
if: steps.file_check.outputs.exists == 'false'
|
|
||||||
run: exit 78
|
|
||||||
|
|
||||||
- name: Download build artifacts
|
- name: Download build artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Reference in a new issue