Repository navigation
53 lines (53 loc) · 2.04 KB
/
Copy pathprocessing-tests.yaml
File metadata and controls
53 lines (53 loc) · 2.04 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: Processing packages
on:
workflow_call:
pull_request:
paths:
- 'water-bodies/command-line-tools/**'
- 'cwl-cli/**'
- 'cwl-workflow/**'
- 'tests/**'
- 'scripts/*cwl-release*'
- 'scripts/check-oci-annotations.py'
- 'scripts/prepare-kubernetes-lab.sh'
- '.github/workflows/build.yaml'
- '.github/workflows/processing-tests.yaml'
push:
branches: [main, master]
paths:
- 'water-bodies/command-line-tools/**'
- 'cwl-cli/**'
- 'cwl-workflow/**'
- 'tests/**'
- 'scripts/*cwl-release*'
- 'scripts/check-oci-annotations.py'
- 'scripts/prepare-kubernetes-lab.sh'
- '.github/workflows/build.yaml'
- '.github/workflows/processing-tests.yaml'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install packages and test tools
run: |
python -m pip install pytest build cwltool \
./water-bodies/command-line-tools/crop \
./water-bodies/command-line-tools/norm_diff \
./water-bodies/command-line-tools/otsu \
./water-bodies/command-line-tools/stac \
./water-bodies/command-line-tools/stage-in \
./water-bodies/command-line-tools/stage-out
- name: Test commands and processing chain
run: pytest --import-mode=importlib tests water-bodies/command-line-tools/{crop,norm_diff,otsu,stac,stage-in,stage-out}/tests
- name: Validate CWL and build wheels and images
run: |
while IFS= read -r cwl; do cwltool --validate "$cwl"; done < <(git ls-files '*.cwl')
for package in crop norm_diff otsu stac stage-in stage-out; do
python -m build --wheel --outdir /tmp/wheels "water-bodies/command-line-tools/$package"
docker build -t "processing-$package:test" "water-bodies/command-line-tools/$package"
docker run --rm "processing-$package:test" "$package" --help
done