From a914258ffb214ce6fbc8b52edace77f0d3cd03a7 Mon Sep 17 00:00:00 2001 From: Bradley Goulding Date: Mon, 19 May 2025 21:41:00 +0200 Subject: [PATCH 1/3] add workflow to test invalid env vars --- .github/workflows/ci-invalid-env.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci-invalid-env.yml diff --git a/.github/workflows/ci-invalid-env.yml b/.github/workflows/ci-invalid-env.yml new file mode 100644 index 0000000..6106a17 --- /dev/null +++ b/.github/workflows/ci-invalid-env.yml @@ -0,0 +1,31 @@ +name: CI + +on: [push] + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up invalid environment variable + run: | + echo 'MULTI_LINE_ENV<> $GITHUB_ENV + echo 'MULTI_LINE_ENV=LINE 1' >> $GITHUB_ENV + echo 'LINE 2' >> $GITHUB_ENV + echo 'LINE 3' >> $GITHUB_ENV + echo 'LINE 4' >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + + - uses: php-actions/composer@v6 + + - name: PHPUnit Tests + uses: php-actions/phpunit@master + env: + TEST_NAME: Scarlett + with: + version: 9.6 + bootstrap: vendor/autoload.php + configuration: test/phpunit.xml + args: --coverage-text From b41bc94066ee04f845ace25291d72b7c5d437a35 Mon Sep 17 00:00:00 2001 From: Bradley Goulding Date: Mon, 19 May 2025 21:43:26 +0200 Subject: [PATCH 2/3] use fixed version --- .github/workflows/ci-invalid-env.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-invalid-env.yml b/.github/workflows/ci-invalid-env.yml index 6106a17..63c9927 100644 --- a/.github/workflows/ci-invalid-env.yml +++ b/.github/workflows/ci-invalid-env.yml @@ -18,10 +18,10 @@ jobs: echo 'LINE 4' >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - - uses: php-actions/composer@v6 + - uses: BradleyGoulding/composer@master - name: PHPUnit Tests - uses: php-actions/phpunit@master + uses: BradleyGoulding/phpunit@master env: TEST_NAME: Scarlett with: From 003689c6123b5477bb679a5ca1a5913b5c755f4e Mon Sep 17 00:00:00 2001 From: Bradley Goulding Date: Mon, 19 May 2025 21:44:51 +0200 Subject: [PATCH 3/3] rename action --- .github/workflows/ci-invalid-env.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-invalid-env.yml b/.github/workflows/ci-invalid-env.yml index 63c9927..c676b50 100644 --- a/.github/workflows/ci-invalid-env.yml +++ b/.github/workflows/ci-invalid-env.yml @@ -1,4 +1,5 @@ -name: CI +name: CI-Invalid-Env +# This workflow is used to test the invalid environment variable handling in the GitHub Actions runner. on: [push]