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

Get Tox Working #43

Merged
merged 15 commits into from
Jun 21, 2023
Merged

Get Tox Working #43

merged 15 commits into from
Jun 21, 2023

Conversation

rachelhsmith
Copy link
Contributor

@rachelhsmith rachelhsmith commented Apr 20, 2023

This PR addresses issue #37

The aim is to use tox to run tests across all variations of Django versions 2.2 - 4.0 and Python versions 3.8 - 3.10.

This PR will enable:

  • tox to run locally by running 'tox' or 'poetry run tox'
  • pytest to run locally on it's own by running 'pytest' or 'poetry run pytest'
  • tox to run on pull requests
  • Pytest to be used as the runner for tox

@rachelhsmith rachelhsmith changed the title Chore/37 get tox working Get Tox Working Apr 20, 2023
@rachelhsmith rachelhsmith marked this pull request as ready for review April 20, 2023 16:11
@jams2 jams2 self-requested a review April 20, 2023 16:17
Copy link
Collaborator

@jams2 jams2 left a comment

Choose a reason for hiding this comment

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

This is a great start, thanks!

This config only runs the tests against Python 3.10. It is running all of the tox envs, but against 3.10. Check the output of the setup-python action - we only install 3.10. These lines also tell us what Python we're running

The reason this is running all of the envs anyway is that the py$VERSION factors must be in the format pyNM for tox to recognise them as interpreter versions, not py-NM as we have here. https://tox.wiki/en/latest/user_guide.html#test-environments is the relevant section of the tox docs.

We need a matrix to run the tests once for each Python version.

The wagtail-localise config might be helpful. They use tox-gh-actions which we could consider. The relevant files are:

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Member

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

Drive-by review with a couple of notes/suggestions.
Feel free to ignore for a future PR

.github/workflows/test.yml Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
@rachelhsmith rachelhsmith requested a review from jams2 May 4, 2023 16:30
Copy link
Collaborator

@jams2 jams2 left a comment

Choose a reason for hiding this comment

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

Could you also update the changelog please?

.github/workflows/test.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@jams2 jams2 merged commit ac83e99 into torchbox:main Jun 21, 2023
5 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.

None yet

3 participants