You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MAINT - CI improvements (security and maintenance) (#2077)
I thought I would do some winter/summer cleaning (depending on your
location) ⛄🌞.
This PR adds several improvements/updates to our CI with a focus on
improving the contributor experience and security
Details below:
## 🔒 Security focused
- Use SHA for third-party actions and our internal action for
development setup
- Replace potentially [dangerous trigger
`workflow_run`](https://woodruffw.github.io/zizmor/audits/#dangerous-triggers)
for `workflow_call` and use as a reusable workflow
- Create and use a dedicated environment for releases:
- [x] Created a `pst-release` environment in the repo (restricted to
`main` only)
- [x] Use `pst-release` for our `release-PST` step in `publish.yml`
- [ ] Add `pst-release` as the default env in PyPI
- Add a `zizmor.yml` workflow to run static analysis on our GH workflows
- Add explicit `persist-credentials: false` to relevant actions (where
we do not need further git operations)
## 👩🏽🎤 Contributor experience
- Prevent the `pre-release.yml` workflow from running in repos not under
the `pydata` org (forks)
- Our CI workflow has grown significantly with the various tests and
checks. This PR splits it into:
- `CI.yml`: pytest, a11y-tests, profiling, coverage
- `docs.yml`: docs-related checks like building across OSes and Python
and Sphinx versions, check for broken links (new, note that I had to fix
some broken links to get this in 🙈 and there seem to be still some
others to fix)
- Add `tox run -e docs-linkcheck` to check for broken links in our docs
- Add workflow to add a link to the RTD docs preview in PRs.
## 🧰 Maintenance
- Adds Python `3.13` to our testing matrices (`3.12` is left as the
`default` until we are confident all is ok with `3.13`)
- Add an explicit `ubuntu-22.04` target as `ubuntu-latest` will soon be
`24.04` (being rolled out right now) -> I think I might actually have
explicit versions on both and only change to latest (or not) when the
rollout is completed
----
## Questions / notes
- @drammock, we have `"sphinx-theme-builder @
https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",`
in our `project. tool` and `tox.ini`. I do not believe this pin is
needed anymore, so I would like to remove it, too. WDYT?
- @drammock did you create the token for Anaconda.org? I would like to
make this an environment secret (vs a repository secret as it is right
now)
- Also, while adding a new environment, I noticed a `github-pages`
environment that I do not think we are using, so I'd like to delete it.
- Finally, I deleted a leftover `PYPI_TOKEN,` which should have been
removed when we changed to trusted publishers.
Closes#2095
---------
Co-authored-by: Daniel McCloy <[email protected]>
0 commit comments