Skip to content

Overhaul the CI Tests - #325

Merged
2320sharon merged 1 commit into
SatelliteShorelines:mainfrom
2320sharon:main
Sep 18, 2026
Merged

2320sharon merged 1 commit into
SatelliteShorelines:mainfrom
2320sharon:main

Conversation

@2320sharon

Copy link
Copy Markdown
Collaborator

Summary

This update overhauls the old CI that tested installs that no user ever did, and fixes the issue where of its workflows installed the released package from PyPI instead of the code in the repo. The new CI follows the documented installation guides and test the commits in the PR. This also adds a new pre-release check that builds the wheel and sdist and installs them before a release goes live.

What changed

New workflows

Workflow Triggers Matrix What it checks
tests.yml, job pypi-install push to main/develop/dev/**, PRs, manual 3 OS x py3.10-3.12 Method #2 (PyPI) from the installation guide: a bare env, pip install ., then conda install gdal on top. pip check must pass and pyTMD must be 3 or newer.
tests.yml, job conda-forge-install push to main/develop/dev/**, PRs, manual 3 OS x py3.11-3.12 Method #1 (conda-forge): installs the published feedstock package, then puts this checkout on top with pip install --no-deps .. Differences between pyproject.toml and the feedstock are show as a warning, not a failure.
dev-install.yml push to main/develop/dev/**, PRs, manual 3 OS x py3.10-3.12 Mimics the way a contributor installs: pip install -e ".[test]" into an env holding only python and gdal. Also checks that coastseg imports from the checkout and not from site-packages.
release_env_matrix.yml ("Pre-release: build & install matrix") release tags (same patterns as Publish_package_to_pypi.yml), manual 3 OS x py3.10-3.12 wheel, plus one sdist cell Runs the release checks, builds the wheel and sdist once, runs twine check, and checks that the runtime data files (bounding-box CSVs, tide_regions_map.geojson) are in the wheel. Installs the built files, then runs an import check and pytest from outside the checkout.

New script: .github/scripts/check_release_ready.py

It runs all five checks below:

  1. No machine-local path/git/url overrides in [tool.pixi.pypi-dependencies]
  2. No absolute paths recorded in pixi.lock
  3. No pkg @ git+... direct references in [project.dependencies], which PyPI rejects after the tag is already pushed
  4. requires-python, the trove classifiers, and the CI matrix list the same Python versions
  5. On a tag build, the tag matches project.version

Removed

  • pip_install_e.yml, replaced by dev-install.yml
  • test_coastseg.yml. It ran pip install coastseg --user from PyPI, so it tested the released package and not the code in the PR. It also used a python 3.10 and a tensorflow environment with actions/checkout@v3 and setup-miniconda@v2.
  • ci/envs/{38,39,310,311,312,313}-coastseg.yaml. These environment files are no longer needed with the new CI tests,

Other changes

  • test_coastseg_with_pixi.yml: added workflow_dispatch so it can be run by hand before a release.
  • README.md: the single pip_install_e.yml badge is replaced by badges for tests.yml and release_env_matrix.yml.

@2320sharon 2320sharon left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@2320sharon
2320sharon merged commit 407d2bd into SatelliteShorelines:main Sep 18, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant