From b050854f4d20c33be2af0f7d420310bd9df36eec Mon Sep 17 00:00:00 2001 From: Giuseppe Foti Date: Mon, 12 Feb 2024 20:45:08 +0100 Subject: [PATCH] define local enviroment for steps Signed-off-by: Giuseppe Foti --- .github/workflows/tests.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c625dbc..d346ed8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,9 +19,6 @@ permissions: jobs: test: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest strategy: matrix: @@ -115,11 +112,11 @@ jobs: if: matrix.php-versions != env.coverage-php-version || matrix.wordpress-version != env.coverage-wp-version run: vendor/bin/phpunit --debug - - name: When using PHP 8.1 and WP 6.4 - Run the tests and generate coverage report (single) + - name: When using PHP ${{coverage-php-version}} and WP ${{coverage-wp-version}} - Run the tests and generate coverage report (single) if: matrix.php-versions == env.coverage-php-version && matrix.wordpress-version == env.coverage-wp-version run: vendor/bin/phpunit --debug --coverage-php coverage/single.cov - - name: When using PHP 8.1 and WP 6.4 - Run the tests and generate coverage report (multisite) + - name: When using PHP ${{coverage-php-version}} and WP ${{coverage-wp-version}} - Run the tests and generate coverage report (multisite) if: matrix.php-versions == env.coverage-php-version && matrix.wordpress-version == env.coverage-wp-version run: vendor/bin/phpunit --debug -c tests/phpunit/multisite.xml --coverage-php=coverage/multisite.cov env: @@ -133,16 +130,25 @@ jobs: - name: Setup Pages if: matrix.php-versions == env.coverage-php-version && matrix.wordpress-version == env.coverage-wp-version + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} uses: actions/configure-pages@v4 - name: Upload artifact if: matrix.php-versions == env.coverage-php-version && matrix.wordpress-version == env.coverage-wp-version + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} uses: actions/upload-pages-artifact@v3 with: # Upload the coverage directory from the repository path: './coverage-html' - name: Deploy to GitHub Pages if: matrix.php-versions == env.coverage-php-version && matrix.wordpress-version == env.coverage-wp-version + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} id: deployment uses: actions/deploy-pages@v4