update apply_classification task and tests #809
This file contains 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: Unit Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
environment-name: [ | |
"py3.10-ecoscope1.8.3", | |
"py3.11-ecoscope1.8.3", | |
"py3.12-ecoscope1.8.3", | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ./ci/envs/${{ matrix.environment-name }}.yml | |
cache-environment: true | |
cache-downloads: true | |
init-shell: bash | |
- name: Install pip dependencies and our package | |
shell: bash -leo pipefail {0} | |
run: | | |
python -m pip install -U pip | |
python -m pip install -e ".[test,lithops]" --config-settings editable_mode=compat | |
- name: Run doctests | |
shell: bash -leo pipefail {0} | |
run: | | |
python -m pytest -v ecoscope_workflows/ --doctest-modules \ | |
--ignore=ecoscope_workflows/visualize.py | |
- name: Export shell name and conda env name to env | |
run: | | |
echo 'SHELL="bash -leo pipefail"' >> $GITHUB_ENV | |
echo "CONDA_ENV_NAME=${{ matrix.environment-name }}" >> $GITHUB_ENV | |
- name: Test with pytest | |
env: | |
EARTHRANGER_SERVER: ${{ secrets.EARTHRANGER_SERVER }} | |
EARTHRANGER_USERNAME: ${{ secrets.EARTHRANGER_USERNAME }} | |
EARTHRANGER_PASSWORD: ${{ secrets.EARTHRANGER_PASSWORD }} | |
shell: bash -leo pipefail {0} | |
run: | | |
python -m pytest tests -v | |
# - name: Upload Coverage to Codecov | |
# uses: codecov/codecov-action@v2 |