Skip to content
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

ci: Test against Python 3.12 #358

Merged
merged 2 commits into from
Aug 9, 2023
Merged

ci: Test against Python 3.12 #358

merged 2 commits into from
Aug 9, 2023

Conversation

alcarney
Copy link
Collaborator

@alcarney alcarney commented Aug 9, 2023

Description (e.g. "Related to ...", etc.)

It won't be long now before Python 3.12 becomes available (see schedule)

By making use of the allow-prereleases flag to actions/setup-python, we should be able to start testing on the pre-release version of Python now and have the pipeline automatically upgrade to the real thing when it becomes available

Code review checklist (for code reviewer to complete)

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Commit messages are meaningful (see this for details)
  • Tests have been included and/or updated, as appropriate
  • Docstrings have been included and/or updated, as appropriate
  • Standalone docs have been updated accordingly

@alcarney
Copy link
Collaborator Author

alcarney commented Aug 9, 2023

@tombh any ideas why all the CI pipelines would be running against Python 3.9.17?
e.g here is the Python 3.8 pipline https://github.com/openlawlibrary/pygls/actions/runs/5813873464/job/15762361442?pr=358#step:7:16

@tombh
Copy link
Collaborator

tombh commented Aug 9, 2023

Oh 😲 Literally the entire matrix is running against 3.9.17, wow.

My hunch is that this is a cache key not capturing the Python version from the matrix. There's a line above in the CI logs, that says the cache key is this: venv-Linux--24170221692f39b8a4570480d97e20d9bf32d65427c4446b210f7445a31547b3. That double hyphen betrays the missing token value from our workflow yaml that defines the key: key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}.

I wonder if steps.setup-python.outputs.python-version could just be replaced with matrix.python-version?

@alcarney
Copy link
Collaborator Author

alcarney commented Aug 9, 2023

I wonder if steps.setup-python.outputs.python-version could just be replaced with matrix.python-version?

Good spot! That looks like it did the trick! 😄

@alcarney alcarney requested a review from tombh August 9, 2023 22:13
@tombh tombh merged commit 05ba2c4 into openlawlibrary:main Aug 9, 2023
@tombh
Copy link
Collaborator

tombh commented Aug 9, 2023

Nice spot from you to see it in the first place! 🤓

@alcarney alcarney deleted the py312 branch August 9, 2023 22:17
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.

2 participants