Skip to content

Commit

Permalink
Experiment with upload and download
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Oct 15, 2020
1 parent d1551b9 commit f78bc33
Showing 1 changed file with 67 additions and 24 deletions.
91 changes: 67 additions & 24 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit f78bc33

Please sign in to comment.