-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run CI tests on 3.12 and multiple operating systems #22
Commits on Sep 17, 2023
-
Run CI test and lint on all branches
This makes pushes trigger CI checks even when they are not to the main branch or in a PR opened against the main branch. This way, CI will work in forks once enabled in the Actions tab (otherwise the changes have to be on the "main" branch of the fork, or a PR is needed).
Configuration menu - View commit details
-
Copy full SHA for 49666d6 - Browse repository at this point
Copy the full SHA 49666d6View commit details -
Remove unused POETRY_VERSION env var in test.yml
Unlike in the two other workflows, the test workflow specifies the poetry version with the poetry-version key in the poetry_setup action configuration.
Configuration menu - View commit details
-
Copy full SHA for f36d2fe - Browse repository at this point
Copy the full SHA f36d2feView commit details -
Bump poetry used on CI from 1.4.2 to 1.6.1
This includes performance improvements for installing, as detailed in https://python-poetry.org/history/#160---2023-08-20.
Configuration menu - View commit details
-
Copy full SHA for 06bd8cf - Browse repository at this point
Copy the full SHA 06bd8cfView commit details -
This is not really a bugfix, because it's possible to infer the correctness of the unquoted expansions in the cases where they appear in the CI workflows. However, quoting them makes the intent clear: we want the literal text produced by the expansion, and it is not intenteded that it be changed by word splitting and globbing (filename expansion) done by the shell.
Configuration menu - View commit details
-
Copy full SHA for ebc1f5d - Browse repository at this point
Copy the full SHA ebc1f5dView commit details -
Test on Python 3.12 experimentally
This allows a prerelease for 3.12, which is currently at RC2 so it will not install if a prerelease is not allowed, while continuing to prohibit installing a prerelease for earlier versions. Because 3.12 is at RC2, the likelihood of test failures on it due to bugs in 3.12 is fairly low. But in any situation where tests do fail on 3.12, it would be necessary to compare the reults to those of at least one other release, to rule this out. So I have also set continue-on-error to true for 3.12 so that failure of a 3.12 job will not cancel the other jobs.
Configuration menu - View commit details
-
Copy full SHA for 8639dfc - Browse repository at this point
Copy the full SHA 8639dfcView commit details -
Use automatically generated matrix job names
Going along with this, to make it so good names are generated: - Change job key names from "build" to be descriptive/intuitive. - Capitalize workflow names to avoid confusion with the new job names, so workflow and job names are styled differently in CI output. This change may produce a minor improvement in clarity right now, but the real benefit is for the forthcoming expansion of the test matrix to include multiple operating systems, where the terser and more common style used to distinguish different generated jobs from the same matrix will be more readable. (Longer names produced from generated jobs are hard to distinguish because the full name would appear cut off in some places in the GitHub Actions web interface.)
Configuration menu - View commit details
-
Copy full SHA for aee13f7 - Browse repository at this point
Copy the full SHA aee13f7View commit details -
Test on three major operating systems
This extends the CI test matrix with an "os" dimension, so it tests on Ubuntu (as before), macOS, and Windows. It tests all five Python version on each, so the matrix now has 15 jobs. Building the value for "os" by appending "-latest" to names like "ubuntu", rather than just using the full names ("ubuntu-latest"), is less idiomatic. However, it helps keep the generated matrix job names narrow enough not to be cut off in the GitHub Actions interface, for matrices like this one that have a third dimension. (Currently, "core" is the only value for "test-type", but it is, and probably should, be kept in the names, thus lengthening them.)
Configuration menu - View commit details
-
Copy full SHA for 836293f - Browse repository at this point
Copy the full SHA 836293fView commit details -
Install poetry with pip (not pipx) in test jobs
This is imperfect, but it allows the correct version of Python to be installed and used with minimal complexity and special casing. Furthermore, because poetry is being used and the project is being installed in a virtual environment, polluting the global Python environment with poetry itself and its dependencies is unlikely to hide unstated dependency bugs or cause conflicts. On Ubuntu runners, pipx works with whatever version of Python is installed by setup-python, and commands like "python3.10" are available in $PATH for pipx to find and use. That is not the case on other GitHub Actions runners, however. This is especially a problem on Windows, where even obtaining the full path to the interpreter cannot be done in any straightforward portable way. (setup-python provides the Python directory in the pythonLocation Python_ROOT_DIR etc. environment variables, but where the Python interpeter is in it can differ by OS. This is practical, though cumbersome, to solve when only CPython is used. But if pypy is also used, which may be desired at some point in the future, then even more special-casing is required, on Windows.)
Configuration menu - View commit details
-
Copy full SHA for ff16cf6 - Browse repository at this point
Copy the full SHA ff16cf6View commit details -
Since kebab-case is more common than snake_case for this usage, and this convention was otherwise being used throughout the workflows.
Configuration menu - View commit details
-
Copy full SHA for b3b3d0a - Browse repository at this point
Copy the full SHA b3b3d0aView commit details