-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (42 loc) · 1.6 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (42 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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: Activate Docker cache
uses: satackey/action-docker-layer-caching@v0.0.8
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- 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 "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