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

Run pytest with different Python versions in GitHub actions #1033

Merged
merged 17 commits into from
Feb 19, 2022

Conversation

LucyJimenez
Copy link
Contributor

@LucyJimenez LucyJimenez commented Feb 16, 2022

xref: #1036
On this PR:

  • Add matrix python versions
  • Separate test and flake8 on different builds.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. Looks good, added some minor things.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@@ -6,6 +8,10 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
Copy link
Member

Choose a reason for hiding this comment

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

Just the first and the last versions should be enough. Too many builds add noise and consume resources. Or we may want to add something else to the matrix (like CPython/PyPy), and then the matrix will explode (like 8 builds just for that change.

@@ -19,4 +25,4 @@ jobs:
run: flake8 .
Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably better to have flake8 and pytest in separate builds. Doesn't make so much sense to test flake8 in different Python versions.

Copy link
Member

Choose a reason for hiding this comment

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

Agree perhaps we could use precommit similar to pandas? https://github.com/pandas-dev/pandas/blob/main/.github/workflows/code-checks.yml#L35 but also happy to not overcomplicate things for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the recommendations, I’m going to implement it.

@LucyJimenez LucyJimenez changed the title Improve CI Improve CI - Python versions Feb 17, 2022
@LucyJimenez LucyJimenez marked this pull request as draft February 17, 2022 22:12
@LucyJimenez LucyJimenez marked this pull request as ready for review February 18, 2022 14:28
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks @LucyJimenez, added some comments.

@@ -3,20 +3,25 @@ name: CI
on: [push, pull_request]

jobs:
build:
test:
name: test w/ Python
Copy link
Member

Choose a reason for hiding this comment

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

Just tests should be enough. To show that it's not pypy we should say CPython, but pypy is likely to be in the matrix, so better to just name this tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right! I changed it.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@datapythonista datapythonista changed the title Improve CI - Python versions Run pytest with different Python versions in GitHub actions Feb 18, 2022
@LucyJimenez LucyJimenez marked this pull request as draft February 18, 2022 17:44
@LucyJimenez LucyJimenez marked this pull request as ready for review February 19, 2022 17:52
@LucyJimenez
Copy link
Contributor Author

LucyJimenez commented Feb 19, 2022

Additional data that could be interesting about the test:

  • CI Py2.7 201 passed, 15 skipped in 466.88s (0:07:46)
  • CI Py3.10 201 passed, 15 skipped, 2 warnings in 551.07s (0:09:11)
  • Appveyor 168 passed, 48 skipped in 1259.22s (0:20:59)

@datapythonista datapythonista merged commit 6a471a8 into airspeed-velocity:master Feb 19, 2022
@datapythonista
Copy link
Member

Thanks @LucyJimenez, really nice

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.

3 participants