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
Test on GitHub Actions #420
Conversation
Yep, too many tests ran today with the account, will need to retry later |
Hey Hugo, |
Hi, no problem! I restarted a build: https://github.com/hugovk/twitter/actions/runs/363545104 Some passed, some failed. I'll check the failures tomorrow. Yes, it has a badge, will be something like: ![Test](https://github.com/sixohsix/twitter/workflows/Test/badge.svg) |
Looking at the test account, it seems like all python versions run simultaneously which might be an issue with the API limits, it is possible to set them to run successively instead of in parallel? |
Good idea! Yes, it's possible with Updated, and that helped: 2.7 and PyPy2 fails due to:
I'll check that (I'm mostly using Codecov on other projects). Maybe using https://github.com/coverallsapp/github-action or https://github.com/AndreMiras/coveralls-python-action instead will help. |
14f5984
to
6cb365a
Compare
Yeah ! \o/ |
Yes, I think we're good to merge! I've remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's just one leftover line I'm not sure about
And out of curiosity, could you tell me what do the pip-cache and actions/cache serve for exactly?
Thanks again!
Sure, they're for caching the pip downloads, so they don't need to be downloaded from PyPI each time. PyPI costs $800k/month in hosting! (In March 2020, will be higher now): I believe this is generously donated by Fastly, but it would be good to help reduce it where possible, and CIs will contribute quite a lot. The config is in two parts: - name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)" First, we check the pip cache directory by calling Strictly speaking, this is only needed when testing on multiple operating systems, we could hardcode it as we're only testing on Linux. More info: - name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-v1- Next, we use the https://github.com/actions/cache action to fetch cache at the start, and potentially save a new cache at the end.
So we could reduce those two chunks to something like: - name: Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.python-version }}-v1- |
Ha great, so it's a cache across successive action runs, I wouldn't even have thought it was possible and was not understanding how caching would work across different python versions :) |
And of course we already sent too many tweets for the day, will rerun the action for the badge to display properly tomorrow! |
And now we're finally good! :) |
Great, happy to help! And thank you for maintaining this library! |
Now we really need to bother @sixohsix one more time and ask for a release, or better rights on pypi ;) |
This tests with the same as Travis CI, and I replaced
nightly
with3.10-dev
, the nearest equivalent.Example: https://github.com/hugovk/twitter/actions/runs/360319693
They fail for me because:
Will try again tomorrow.