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

Implement CI in github actions #1

Closed
wants to merge 3 commits into from
Closed

Conversation

Nothing4You
Copy link
Owner

@Nothing4You Nothing4You commented Jan 2, 2022

  • migrate travis CI tests to github actions
    • release publishing is not currently implemented
  • drop python 3.5 and 3.6 support
  • run tests for python 3.7 to 3.9
  • run tests for MySQL 5.7 and 8.0 latest
  • run tests for MariaDB 10.2 to 10.7 and latest
  • bump dev/test dependencies
    • migrate deprecated test syntax
  • remove docker integration from tests, for automated builds this is now covered by github actions
  • async test methods have been broken before already https://app.travis-ci.com/github/aio-libs/aiomysql/jobs/448298144#L2340
  • each matrix job is currently limited to 15 minutes total execution, it should be safe to expect the tests to be completed by then. in my tests (with pip cache) the tests usually run about 1.5 minutes.
  • pytest job is soft limited to 5 minutes, hard limited to 6 minutes to avoid test hangs.
    in my tests this is typically completed in less than a minute.
    in broken tests we can easily deadlock otherwise and the test would otherwise keep running for hours.
  • port fix for test_issue_3 for MySQL 8.0 compatibility from test: issue3 MySQL-8.0 now returns NULL(None) for timestamp PyMySQL/PyMySQL#658
  • test_connection_gone_away fails on MySQL 8.0
  • test_drop_connection_if_timedout fails on MySQL 8.0, test was patched to close the pool to avoid blocking forever

open questions:

  • is there any point in running a set of separate tests for PYTHONASYNCIODEBUG=1?
  • should python 3.10 test compatibility be implemented in this PR or separately after this is merged?

@Nothing4You Nothing4You force-pushed the github-actions branch 5 times, most recently from c2e7d4a to 87508ea Compare January 2, 2022 15:56
@codecov
Copy link

codecov bot commented Jan 2, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@45d241e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #1   +/-   ##
=========================================
  Coverage          ?   83.56%           
=========================================
  Files             ?       12           
  Lines             ?     2051           
  Branches          ?      332           
=========================================
  Hits              ?     1714           
  Misses            ?      266           
  Partials          ?       71           
Flag Coverage Δ
ubuntu-latest_3.7_mariadb-10.2 82.28% <0.00%> (?)
ubuntu-latest_3.7_mariadb-10.3 82.28% <0.00%> (?)
ubuntu-latest_3.7_mariadb-10.4 82.28% <0.00%> (?)
ubuntu-latest_3.7_mariadb-10.5 82.28% <0.00%> (?)
ubuntu-latest_3.7_mariadb-10.6 82.28% <0.00%> (?)
ubuntu-latest_3.7_mariadb-10.7 82.28% <0.00%> (?)
ubuntu-latest_3.7_mysql-5.7 83.18% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.2 82.68% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.3 82.68% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.4 82.68% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.5 82.68% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.6 82.68% <0.00%> (?)
ubuntu-latest_3.8_mariadb-10.7 82.68% <0.00%> (?)
ubuntu-latest_3.8_mysql-5.7 83.56% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.2 82.68% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.3 82.68% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.4 82.68% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.5 82.68% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.6 82.68% <0.00%> (?)
ubuntu-latest_3.9_mariadb-10.7 82.68% <0.00%> (?)
ubuntu-latest_3.9_mysql-5.7 83.56% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45d241e...1fbb82e. Read the comment docs.

@Nothing4You Nothing4You force-pushed the github-actions branch 24 times, most recently from 39a1771 to 3f8227e Compare January 2, 2022 20:48
  - release publishing is not currently implemented
- drop python 3.5 and 3.6 support
- run tests for python 3.7 to 3.9
  - python 3.10 tests fail due to removed `loop` argument, therefore currently disabled
    - this is only an issue in the test suite afaik
  - python 3.11 tests currently fail to install `uvloop`, therefore currently disabled
    - see MagicStack/uvloop#450
- run tests for MySQL 5.7 and 8.0 `latest`
- run tests for MariaDB 10.2 to 10.7 and `latest`
- bump dev/test dependencies
  - migrate deprecated test syntax
- remove docker integration from tests, for automated builds this is now covered by github actions
- async test methods have been broken before already https://app.travis-ci.com/github/aio-libs/aiomysql/jobs/448298144#L2340
- each matrix job is currently limited to 15 minutes total execution, it should be safe to expect the tests to be completed by then. in my tests (with pip cache) the tests usually run about 1.5 minutes.
- pytest job is soft limited to 5 minutes, hard limited to 6 minutes to avoid test hangs.
in my tests this is typically completed in less than a minute.
in broken tests we can easily deadlock otherwise and the test would otherwise keep running for hours.
- port fix for `test_issue_3` for MySQL 8.0 compatibility from PyMySQL/PyMySQL#658
- `test_connection_gone_away` fails on MySQL 8.0
- `test_drop_connection_if_timedout` fails on MySQL 8.0, test was patched to close the pool to avoid blocking forever
.github/workflows/ci.yml Outdated Show resolved Hide resolved
- 'mysql:8.0'
- 'mysql:latest'
- 'mariadb:10.2'
- 'mariadb:10.3'

Choose a reason for hiding this comment

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

Do you really want to check against so many mariadb instances?
If yes -- it's ok but I suspect the slow execution time.
Maybe some versions can be dropped?

Copy link
Owner Author

Choose a reason for hiding this comment

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

currently - with all tests duplicated to include a PYTHONASYNCIODEBUG=1 run - this has a total runtime of 6m 24s.
with the PYTHONASYNCIODEBUG=1 runs removed i think all tests will currently be able to run in parallel, which should be able to cut this down a bit further.
to me this seems acceptable?
i've selected all currently supported database versions to ensure full coverage.

Choose a reason for hiding this comment

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

Ok, agree

Copy link
Owner Author

Choose a reason for hiding this comment

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

i removed the latest tags though as they're redundant with the latest explicit version and won't cause unexpected test failures due to new db version releases.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@Nothing4You
Copy link
Owner Author

merged upstream at aio-libs#645

@Nothing4You Nothing4You deleted the github-actions branch January 10, 2022 18:03
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