Skip to content

Commit

Permalink
Upload code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt authored Dec 19, 2023
1 parent 33d3900 commit a6edda5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/dea-intertidal-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
},
}
Expand Down
6 changes: 5 additions & 1 deletion tests/run_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# Run integration tests and generate code coverage
pytest --cov=coastlines --cov-report=xml tests/integration
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/

0 comments on commit a6edda5

Please sign in to comment.