From 1c7b9fb39d664317bbda226e8cc8e788c81e4354 Mon Sep 17 00:00:00 2001 From: Charles GAYDON Date: Thu, 5 May 2022 10:18:10 +0200 Subject: [PATCH] CICD happens via pytest for large file --- .github/workflows/cicd.yaml | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 372b2037..66154cfb 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -29,20 +29,22 @@ jobs: - name: Check code neatness (linter) run: docker run lidar_prod_im flake8 - - name: Run tests - fast ones go first. - run: docker run lidar_prod_im python -m pytest -v -m "not slow" --ignore=actions-runner + - name: Run tests & get coverage - fast ones go first. + run: > + docker run + lidar_prod_im + python -m + pytest -rA -v -m "not slow" --ignore=actions-runner - - name: Run slow tests last. + - name: Run slow tests last (evaluation on large file) run: > - docker run - -v /var/data/cicd/CICD_github_assets/M8.4/inputs/evaluation/:/lidar/lidar-prod-quality-control/tests/files/large/ + docker run + -v /var/data/cicd/CICD_github_assets/M8.4/inputs/evaluation/:/lidar/tests/files/large/ lidar_prod_im python -m - pytest -v -m slow - --ignore=actions-runner - --no-cov + pytest -rA -v -m "slow" --ignore=actions-runner --no-cov - - name: Full module run on LAS subset using CLI. + - name: Test run from CLI on a LAS subset. run: > docker run -v /var/data/cicd/CICD_github_assets/M8.4/inputs/:/inputs/ @@ -54,22 +56,6 @@ jobs: paths.src_las=/inputs/730000_6360000.subset.prototype_format202.las paths.output_dir=/outputs/ - # This is somewhat redundant with unit test but may serve a a doc on usage ? - - name: Evaluate decisions using optimization task (debug mode means on a single, corrected LAS) using CLI. - run: > - docker run - -v /var/data/cicd/CICD_github_assets/M8.4/inputs/evaluation/:/inputs/ - -v /var/data/cicd/CICD_github_assets/M8.4/outputs/evaluation/:/outputs/ - lidar_prod_im - python lidar_prod/run.py - print_config=true - +task='optimize' - +building_validation.optimization.debug=true - building_validation.optimization.todo='prepare+evaluate+update' - building_validation.optimization.paths.input_las_dir=/inputs/ - building_validation.optimization.paths.results_output_dir=/outputs/ - building_validation.optimization.paths.building_validation_thresholds_pickle=/inputs/optimized_thresholds.pickle - # Everything ran so we tag the valid docker image to keep it # This happens for push events, which are in particular # triggered when a pull request is merged.