diff --git a/.github/workflows/dea-intertidal-image.yml b/.github/workflows/dea-intertidal-image.yml index aad0874..4844c53 100644 --- a/.github/workflows/dea-intertidal-image.yml +++ b/.github/workflows/dea-intertidal-image.yml @@ -51,6 +51,13 @@ jobs: docker-compose exec -T dea_intertidal /bin/sh -c "sh ./tests/run_tests" docker-compose down + # Update code coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + directory: ./artifacts/ + fail_ci_if_error: false + push_ecr: needs: [test] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 245e0a0..955fa2e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ [![DOI](https://img.shields.io/badge/DOI-10.1016/j.ecss.2019.03.006-0e7fbf.svg)](https://doi.org/10.1016/j.ecss.2019.03.006) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![codecov](https://codecov.io/gh/GeoscienceAustralia/dea-intertidal/branch/tests/graph/badge.svg?token=7HXSIPGT5I)](https://codecov.io/gh/GeoscienceAustralia/dea-intertidal) +[![example workflow](https://github.com/GeoscienceAustralia/dea-intertidal/actions/workflows/dea-intertidal-image.yml/badge.svg)](https://github.com/GeoscienceAustralia/intertidal/actions/workflows/dea-intertidal-image.yml) **License:** The code in this repository is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). Digital Earth Australia data is licensed under the [Creative Commons by Attribution 4.0 license](https://creativecommons.org/licenses/by/4.0/). diff --git a/docker-compose.yml b/docker-compose.yml index 42840a5..651a22f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,6 +31,7 @@ services: - GDAL_HTTP_MAX_RETRY=10 volumes: - .:/code + - ./artifacts:/mnt/artifacts - ./tide_models/:/var/share/tide_models depends_on: - public_odc diff --git a/setup.py b/setup.py index b97f6a9..6845be8 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ "entry_points": { "console_scripts": [ "dea-intertidal = intertidal.elevation:intertidal_cli", - "dea-intertidal-hltc = intertidal.hltc:hltc_cli", + "dea-intertidal-composites = intertidal.composites:intertidal_composites_cli", ] }, } diff --git a/tests/run_tests b/tests/run_tests index 7419bbc..d1be17c 100644 --- a/tests/run_tests +++ b/tests/run_tests @@ -1,4 +1,8 @@ #!/bin/sh # Run integration tests and generate code coverage -pytest --cov=coastlines --cov-report=xml tests/integration \ No newline at end of file +pytest --cov=coastlines --cov-report=xml tests/integration + +# Copy code coverage to artifacts directory so they are accessible +# outside the docker container via the mounted volume +cp coverage.xml /mnt/artifacts/ \ No newline at end of file