Skip to content

Commit

Permalink
SNOW-870363: Integrate code coverage with CodeCov (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jl authored Aug 2, 2023
1 parent 3bf73b8 commit d752ab3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,23 @@ jobs:

- name: test driver
run: python ./.github/workflows/scripts/test_driver.py

# codecov action sometimes fails but retry works - until action provides retry let's retry on our own https://github.com/codecov/codecov-action/issues/926
- name: Upload coverage reports to Codecov (take 1)
id: uploadToCodeCovTake1
uses: codecov/codecov-action@v3
continue-on-error: true
with:
gcov: true
verbose: true
fail_ci_if_error: true

- name: Upload coverage reports to Codecov (take 2)
id: uploadToCodeCovTake2
# only run when take 1 failed
if: steps.uploadToCodeCovTake1.outcome == 'failure'
uses: codecov/codecov-action@v3
with:
gcov: true
verbose: true
fail_ci_if_error: true
6 changes: 3 additions & 3 deletions tests/getattribute.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ pdo_snowflake.cacert=libsnowflakeclient/cacert.pem
$driver_ver = $dbh->getAttribute(PDO::ATTR_CLIENT_VERSION);
if (strcmp($driver_ver, '1.2.7') >= 0) {
// comment out driver version to avoid update test case for each release
echo "Successfully get dirver version " . /*$driver_ver .*/ "\n";
echo "Successfully get driver version " . /*$driver_ver .*/ "\n";
}
else {
echo "Failed get dirver version.\n";
echo "Failed get driver version.\n";
}
?>
===DONE===
Expand All @@ -56,5 +56,5 @@ PDO::ATTR_PERSISTENT:
PDO::ATTR_AUTOCOMMIT: 1
PDO::ATTR_AUTOCOMMIT: 0
0 0 0 0 0
Successfully get dirver version
Successfully get driver version
===DONE===

0 comments on commit d752ab3

Please sign in to comment.