Skip to content

Commit

Permalink
Updated github_ci.yml.tpl
Browse files Browse the repository at this point in the history
  • Loading branch information
Netkas committed Sep 24, 2024
1 parent cba5f70 commit 29e0a6e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,29 @@ jobs:
name: %ASSEMBLY.NAME%_build
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 "::set-output name=phpunit-exists::true"
else
echo "::set-output name=phpunit-exists::false"
fi

test:
needs: build
needs: [build, check-phpunit]
runs-on: ubuntu-latest
container:
image: php:8.3
if: ${{ exists('phpunit.xml') }}
if: needs.check-phpunit.outputs.phpunit-exists == 'true'

steps:
- name: Checkout repository
Expand Down

0 comments on commit 29e0a6e

Please sign in to comment.