From 79ece51ea70194b607a5c4811a582163c3c53a7c Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Sun, 22 Oct 2023 16:13:08 +0330 Subject: [PATCH 1/5] Upgrade codecov/codecov-action to v3; --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 62f9d40..98e25a5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -62,7 +62,7 @@ jobs: run: composer test:ci - name: Upload coverage - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml + files: ./coverage.xml From edb3ffd5a001b79b48e4d19558d2d25043a99181 Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Sun, 22 Oct 2023 16:23:23 +0330 Subject: [PATCH 2/5] Upgrade XML configuration schema; --- phpunit.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 4555ccb..aea0250 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,17 +1,11 @@ - + ./tests/ - - - - ./src - - - + @@ -24,4 +18,9 @@ + + + ./src + + From 86fe98bb159c51452cb7804b297744994193ea24 Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Sun, 22 Oct 2023 17:59:18 +0330 Subject: [PATCH 3/5] checkout and cache actions upgraded; --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 98e25a5..bf7bcda 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,10 +27,10 @@ jobs: run: sudo apt-get install ffmpeg - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.composer/cache/files key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} From f88f1c0772e688dcd8f2d69adb86c54f983ab16c Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Mon, 23 Oct 2023 13:51:22 +0330 Subject: [PATCH 4/5] Separate job for uploading coverage report; --- .github/workflows/run-tests.yml | 43 ++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bf7bcda..85ab4b8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -47,8 +47,6 @@ jobs: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo, gd, imagick, xdebug tools: composer:v2 - ini-values: xdebug.mode="coverage" - coverage: xdebug - name: Fix Imagick Policy run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml @@ -58,6 +56,45 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + - name: Execute tests + run: composer test + + upload-coverage: + + runs-on: ubuntu-latest + needs: tests + + steps: + - name: Update apt + run: sudo apt-get update --fix-missing + + - name: Install ffmpeg + run: sudo apt-get install ffmpeg + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install optimizers + run: | + sudo apt-get update -y + sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp + sudo npm install -g svgo + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo, gd, imagick, xdebug + tools: composer:v2 + ini-values: xdebug.mode="coverage" + coverage: xdebug + + - name: Fix Imagick Policy + run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml + + - name: Install dependencies + run: composer update --prefer-stable --prefer-dist --no-interaction --no-suggest + - name: Execute tests run: composer test:ci @@ -65,4 +102,4 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml + files: ./coverage.xml \ No newline at end of file From d83bb5b09d207ab8e1725ba3eb879ef00e8ee5ed Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Mon, 23 Oct 2023 14:14:49 +0330 Subject: [PATCH 5/5] Revert " Separate job for uploading coverage report;" This reverts commit f88f1c0772e688dcd8f2d69adb86c54f983ab16c. --- .github/workflows/run-tests.yml | 43 +++------------------------------ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 85ab4b8..bf7bcda 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -47,6 +47,8 @@ jobs: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo, gd, imagick, xdebug tools: composer:v2 + ini-values: xdebug.mode="coverage" + coverage: xdebug - name: Fix Imagick Policy run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml @@ -56,45 +58,6 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - - name: Execute tests - run: composer test - - upload-coverage: - - runs-on: ubuntu-latest - needs: tests - - steps: - - name: Update apt - run: sudo apt-get update --fix-missing - - - name: Install ffmpeg - run: sudo apt-get install ffmpeg - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install optimizers - run: | - sudo apt-get update -y - sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp - sudo npm install -g svgo - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo, gd, imagick, xdebug - tools: composer:v2 - ini-values: xdebug.mode="coverage" - coverage: xdebug - - - name: Fix Imagick Policy - run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml - - - name: Install dependencies - run: composer update --prefer-stable --prefer-dist --no-interaction --no-suggest - - name: Execute tests run: composer test:ci @@ -102,4 +65,4 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml \ No newline at end of file + files: ./coverage.xml