diff --git a/.github/workflows/ncc_workflow.yml b/.github/workflows/ncc_workflow.yml index f1774df..ddaf92a 100644 --- a/.github/workflows/ncc_workflow.yml +++ b/.github/workflows/ncc_workflow.yml @@ -59,12 +59,29 @@ jobs: name: OptsLib_build path: build/release/net.nosial.optslib.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