From f78bc33729ad6844ee153d718b72c6cdde12b6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Wed, 14 Oct 2020 23:26:59 +0200 Subject: [PATCH] Experiment with upload and download --- .github/workflows/continuous-integration.yml | 91 ++++++++++++++------ 1 file changed, 67 insertions(+), 24 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1237b1ec9cd..c040bd3179b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -59,10 +59,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }}" + name: "phpunit-sqlite-${{ matrix.deps }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" phpunit-oci8: name: "PHPUnit on OCI8" @@ -106,10 +107,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/oci8.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }}" + name: "${{ github.job }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" phpunit-pdo-oci: name: "PHPUnit on PDO_OCI" @@ -153,10 +155,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }}" + name: "${{ github.job }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" phpunit-postgres: name: "PHPUnit with PostgreSQL" @@ -215,10 +218,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }},postgres-${{ matrix.postgres-version }}" + name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" phpunit-mariadb: name: "PHPUnit with MariaDB" @@ -279,10 +283,12 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }},mariadb-${{ matrix.mariadb-version }},${{ matrix.extension }}" + name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" + phpunit-mysql: name: "PHPUnit with MySQL" @@ -356,10 +362,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}${{ matrix.config-file-suffix }}.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }},mysql-${{ matrix.mysql-version }},${{ matrix.extension }}" + name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.config-file-suffix }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" phpunit-mssql: name: "PHPUnit with SQL Server" @@ -425,10 +432,11 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }},${{ matrix.extension }}" + name: "${{ github.job }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.collation }}.coverage" + path: "coverage.xml" phpunit-ibm-db2: name: "PHPUnit with IBM DB2" @@ -488,10 +496,12 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - uses: "codecov/codecov-action@v1" + - name: "Upload coverage file" + uses: "actions/upload-artifact@v2" with: - flags: "${{ github.job }},php-${{ matrix.php-version }}" + name: "${{ github.job }}-${{ matrix.php-version }}.coverage" + path: "coverage.xml" + development-deps: name: "PHPUnit with SQLite and development dependencies" @@ -526,3 +536,36 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml" + + upload_coverage: + name: "Upload coverage to Codecov" + runs-on: "ubuntu-20.04" + needs: + - "phpunit-smoke-check" + - "phpunit-oci8" + - "phpunit-pdo-oci" + - "phpunit-postgres" + - "phpunit-mariadb" + - "phpunit-mysql" + - "phpunit-mssql" + - "phpunit-ibm-db2" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + with: + fetch-depth: 2 + + - name: "Download coverage files" + uses: "actions/download-artifact@v2" + with: + path: "reports" + + - name: "Display structure of downloaded files" + run: ls -R + working-directory: reports + + - name: "Upload to Codecov" + uses: "codecov/codecov-action@v1" + with: + directory: reports