Update test.yml to use uv #565
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: [push] | |
| env: | |
| ORG: geoscienceaustralia | |
| IMAGE: dea-conflux | |
| METADATA_CATALOG: https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/a4f39b485b33608a016032d9987251881fec4b6f/workspaces/sandbox-metadata.yaml | |
| PRODUCT_CATALOG: https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/87ca056fa62900596cbf05612da9033fc763009c/workspaces/sandbox-products.csv | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Pre-pull layers | |
| run: docker compose pull | |
| - name: Build dea-conflux image | |
| run: | | |
| docker compose build | |
| - name: Setup dea-conflux test environment | |
| run: | | |
| docker compose up -d | |
| ./tests/setup_test_datacube.sh | |
| docker compose exec -T conflux bash -c "uv pip install -e ." | |
| - name: Run dea-conflux test | |
| run: | | |
| docker compose exec -T conflux bash -c "coverage run -m pytest ." | |
| docker compose exec -T conflux bash -c "coverage report -m" | |
| docker compose exec -T conflux bash -c "coverage xml" | |
| docker compose exec -T conflux bash -c "coverage html" | |
| docker compose down | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v2 | |
| with: | |
| fail_ci_if_error: false | |
| - name: Clean dea-conflux image | |
| run: | | |
| (echo y) | docker container prune | |
| (echo y) | docker image prune |