-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test-pip-install for testing not requires ecoscope core tasks
- Loading branch information
1 parent
b47e2d4
commit 267f3ec
Showing
3 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Test (pip) | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v4 | ||
id: restore-cache | ||
with: | ||
key: "pip-venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}" | ||
path: | | ||
.venv/ | ||
- name: If no cache hit, recreate venv | ||
if: steps.restore-cache.outputs.cache-hit == false | ||
run: | | ||
python -m venv .venv | ||
.venv/bin/python -m pip install --upgrade pip | ||
.venv/bin/python -m pip install -e ".[test,lithops]" | ||
- name: Run doctests | ||
run: | | ||
.venv/bin/python -m pytest -v ecoscope_workflows/ --doctest-modules \ | ||
--ignore=ecoscope_workflows/visualize.py | ||
- name: Test with pytest | ||
run: | | ||
.venv/bin/python -m pytest -m "not requires_ecoscope_core" tests -vvv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,14 @@ dependencies = [ | |
"pydantic-settings", | ||
"tomli-w", | ||
# compile-time only; todo: these could actually be optional dependencies | ||
# as they are not required for running workflows (just for compiling them) | ||
"jinja2", | ||
"ruamel.yaml", | ||
"ruff", | ||
] | ||
|
||
[project.optional-dependencies] | ||
ecoscope-core-tasks = [ | ||
ecoscope-core = [ | ||
"ecoscope @ git+https://github.com/wildlife-dynamics/[email protected]" | ||
] | ||
gcs = [ | ||
|