From 1ddb0421756e93a416b8d4d4dbfba429eabe0276 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 00:30:09 -0400 Subject: [PATCH 01/10] Updated github_ci.yml.tpl --- .../Classes/PhpExtension/Templates/github_ci.yml.tpl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index 39cb01e..4e7f45a 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -73,14 +73,15 @@ jobs: id: file_check run: | if [ -f phpunit.xml ]; then - echo "::set-output name=exists::true" + echo "phpunit.xml exists" else - echo "::set-output name=exists::false" + echo "phpunit.xml does not exist" + exit 0 fi - name: Skip if no phpunit.xml - if: steps.file_check.outputs.exists == 'false' - run: exit 78 + if: steps.file_check.outcome == 'success' && steps.file_check.conclusion == 'skipped' + run: exit 0 - name: Download build artifacts uses: actions/download-artifact@v4 @@ -155,4 +156,4 @@ jobs: files: | %ASSEMBLY.NAME%_build/%ASSEMBLY.PACKAGE%.ncc env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From cba5f7041a35dbdfca8647d46c1515628ffbd0a3 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 00:34:15 -0400 Subject: [PATCH 02/10] Updated github_ci.yml.tpl --- .../PhpExtension/Templates/github_ci.yml.tpl | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index 4e7f45a..6465b21 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -64,25 +64,12 @@ jobs: runs-on: ubuntu-latest container: image: php:8.3 + if: ${{ exists('phpunit.xml') }} steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Check for phpunit.xml - id: file_check - run: | - if [ -f phpunit.xml ]; then - echo "phpunit.xml exists" - else - echo "phpunit.xml does not exist" - exit 0 - fi - - - name: Skip if no phpunit.xml - if: steps.file_check.outcome == 'success' && steps.file_check.conclusion == 'skipped' - run: exit 0 - - name: Download build artifacts uses: actions/download-artifact@v4 with: From 29e0a6e4ae6d910e0d971f7ae51af658ce86115b Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 00:36:31 -0400 Subject: [PATCH 03/10] Updated github_ci.yml.tpl --- .../PhpExtension/Templates/github_ci.yml.tpl | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index 6465b21..5a7e914 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -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 From cba6942ccad350199bea068fb9018ea5d95fe39e Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:32:27 -0400 Subject: [PATCH 04/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index 5a7e914..ccc544f 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -71,10 +71,9 @@ jobs: id: check run: | if [ -f phpunit.xml ]; then - echo "::set-output name=phpunit-exists::true" + echo "phpunit-exists=true" >> $GITHUB_ENV else - echo "::set-output name=phpunit-exists::false" - fi + echo "phpunit-exists=false" >> $GITHUB_ENV test: needs: [build, check-phpunit] From 33865d7e48b1da27dad2deac46597095bf8d4860 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:35:25 -0400 Subject: [PATCH 05/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index ccc544f..b3a18ed 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -80,7 +80,7 @@ jobs: runs-on: ubuntu-latest container: image: php:8.3 - if: needs.check-phpunit.outputs.phpunit-exists == 'true' + if: ${{ needs.check-phpunit.outputs.phpunit-exists == 'true' }} steps: - name: Checkout repository From e225add40bab952074211014165952ac84b8a37b Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:37:19 -0400 Subject: [PATCH 06/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index b3a18ed..f095990 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -74,6 +74,7 @@ jobs: echo "phpunit-exists=true" >> $GITHUB_ENV else echo "phpunit-exists=false" >> $GITHUB_ENV + fi test: needs: [build, check-phpunit] From 9136396700cd6a44683dae7e337f8990e5bed1e9 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:39:36 -0400 Subject: [PATCH 07/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index f095990..d7b29a0 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -76,6 +76,9 @@ jobs: echo "phpunit-exists=false" >> $GITHUB_ENV fi + - name: Print phpunit-exists + run: echo "phpunit-exists=$phpunit-exists" + test: needs: [build, check-phpunit] runs-on: ubuntu-latest From 36d8e6f8c6803ddd86db3331489c0237b1de85e4 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:42:04 -0400 Subject: [PATCH 08/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index d7b29a0..e976c52 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -76,8 +76,9 @@ jobs: echo "phpunit-exists=false" >> $GITHUB_ENV fi - - name: Print phpunit-exists - run: echo "phpunit-exists=$phpunit-exists" + - name: Set output + id: set-output + run: echo "::set-output name=phpunit-exists::$(grep 'phpunit-exists' $GITHUB_ENV | cut -d '=' -f 2)" test: needs: [build, check-phpunit] From 51bdb22540f614c0b8fcd4643e05918881ee34fe Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:45:09 -0400 Subject: [PATCH 09/10] Updated github_ci.yml.tpl --- .../Classes/PhpExtension/Templates/github_ci.yml.tpl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index e976c52..dc33870 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -66,26 +66,21 @@ jobs: 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_ENV + echo "::set-output name=phpunit-exists::true" else - echo "phpunit-exists=false" >> $GITHUB_ENV + echo "::set-output name=phpunit-exists::false" fi - - name: Set output - id: set-output - run: echo "::set-output name=phpunit-exists::$(grep 'phpunit-exists' $GITHUB_ENV | cut -d '=' -f 2)" - test: needs: [build, check-phpunit] runs-on: ubuntu-latest container: image: php:8.3 - if: ${{ needs.check-phpunit.outputs.phpunit-exists == 'true' }} + if: needs.check-phpunit.outputs.phpunit-exists == 'true' steps: - name: Checkout repository From 8ceb6756a47cb447d182f1bbc25549a3e790220f Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 24 Sep 2024 12:48:16 -0400 Subject: [PATCH 10/10] Updated github_ci.yml.tpl --- src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl index dc33870..66ea497 100644 --- a/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl +++ b/src/ncc/Classes/PhpExtension/Templates/github_ci.yml.tpl @@ -70,9 +70,9 @@ jobs: id: check run: | if [ -f phpunit.xml ]; then - echo "::set-output name=phpunit-exists::true" + echo "phpunit-exists=true" >> $GITHUB_OUTPUT else - echo "::set-output name=phpunit-exists::false" + echo "phpunit-exists=false" >> $GITHUB_OUTPUT fi test: