[develop]: Regression test improvements #112
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: Python Tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - 'release/*' | |
| pull_request: | |
| branches: | |
| - develop | |
| - 'release/*' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash -leo pipefail {0} | |
| jobs: | |
| python_tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Install Micromamba and vx_workflow environment | |
| uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: environment.yml | |
| environment-name: vx_workflow | |
| init-shell: bash | |
| cache-downloads: true | |
| cache-environment: true | |
| - name: Lint the python code | |
| run: | | |
| micromamba activate vx_workflow | |
| pylint --version | |
| pylint --ignore-imports=yes tests/test_python/test_*.py | |
| pylint ush/generate_wflow.py | |
| pylint ush/setup.py | |
| pylint scripts/*.py | |
| - name: Run python unittests | |
| run: | | |
| # exclude test_retrieve_data that is tested in functional test | |
| micromamba activate vx_workflow | |
| export UNIT_TEST=True | |
| export PYTHONPATH=$(pwd)/ush | |
| python -m unittest discover -s tests/test_python -p "test_*.py" | |
| # - name: Run python functional tests | |
| # run: | | |
| # micromamba activate vx_workflow | |
| # export CI=true | |
| # export PYTHONPATH=${PWD}/ush | |
| # python3 -m unittest tests.test_python.test_retrieve_data |