Repository: opendatacube/odc-tools (language: python)

Issue:
Publish test coverage to CodeCOV
#258 Adds coverage testing. This is currently at 51%. Publish this to CodeCov and progressively improve coverage on the collection of tools here to improve stability.


Discussion / hints:

Fix patch:
diff --git a/.github/.codecov.yml b/.github/.codecov.yml
new file mode 100644
index 000000000..53f8f1388
--- /dev/null
+++ b/.github/.codecov.yml
@@ -0,0 +1,13 @@
+codecov:
+  require_ci_to_pass: yes
+
+coverage:
+  status:
+    project:
+      default: # This can be anything, but it needs to exist as the name
+        # basic settings
+        target: 50%
+        threshold: 20%
+    precision: 2
+    round: down
+    range: "20...100"
\ No newline at end of file


Test patch:
diff --git a/.github/workflows/test-dc-tools.yml b/.github/workflows/test-dc-tools.yml
index 8cccd6965..0da34cf7a 100644
--- a/.github/workflows/test-dc-tools.yml
+++ b/.github/workflows/test-dc-tools.yml
@@ -27,4 +27,10 @@ jobs:
         docker-compose up -d
         docker-compose exec -T tools-tester bash -c "pip install wget && /code/apps/dc_tools/assets/bootstrap-odc.sh \$PRODUCT_CATALOG \$METADATA_CATALOG" || true
         docker-compose exec -T tools-tester datacube product add https://raw.githubusercontent.com/digitalearthafrica/config/78dfc5a1895b48225803cb0891b99eb01feb9f2e/products/esa_s2_l2a.odc-product.yaml
-        docker-compose exec -T tools-tester pytest --cov=/code/ --timeout=30
+        docker-compose exec -T tools-tester pytest --cov=/code/ --cov-report xml:coverage.xml --timeout=30
+
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        fail_ci_if_error: false
+        verbose: false