-
Notifications
You must be signed in to change notification settings - Fork 631
CI Strategy EOY 2020 #951
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
Comments
Azure Pipelines is pretty quick I will say that, and it work well and can be used as a single CI instead of having to use AppVeyor and Travis-CI. |
Yeah I'm also a fan of Azure, but it seems we can do almost everything with Github actions which would be marginally easier (and probably runs on Azure by now!). AppVeyor has always been pretty slow for us. Need to check if we can run socketcan tests via github actions. |
Ok, so I'll remove some redundant Travis testing (move it to Gitlab action in three lines of code) in #940 and not introduce more on that branch until more have commented on this. |
So yeah, travis is faster is it is not longer in queue for half a day. |
the GitHub actions are probably running on Azure servers like you said. It is all Microsoft... AppVeyor in it's heyday was good, Just Like Travis-CI was also. They have to much load now and investment into more, newer and faster servers hasn't kept pace. Microsoft has just about unlimited money at their disposal, so it shouldn't end up in the same boat. but who knows |
It seems like moving to Github actions will not face much resistance here, and it also removes quite a bit of setup complexity for the pipelines. This is because we can (mostly) abandon Travis and completely abandon Appveyor. I'd thus advocate for merging #940 (@hardbyte you already approved it) and can offer to
in a separate PR. |
I was also curious about using vcan, for example. Github states they don't have plan to support that. |
#940 is merged. This was done:
To be done:
|
After #1009 is merged, IMHO this issue can be closed. One could think about moving linters, documentation and releasing from Travis CI to GitHub Actions but I don't see a huge benefit there. But also not really a drawback besides the moderate amount of work needed to be done. |
@felixdivo @hardbyte Can we use a personal access token here?
If the commit is done with the GITHUB_TOKEN, then it does not trigger a new workflow run. But codecov, travis etc are triggered which is messing with the code coverage check. See here for example. |
If we switched to using a PAT, what do you suggest to avoid recursive workflow runs? I'm happy to disable the format-code workflow if it is messing things up |
I don't see how it could be recursive. The workflow is only repeated when the black formatting is committed. This cannot happen more than once (unless we do something silly in the future...) I would change the workflow to:
example yaml
name: Tests
on: [push, pull_request]
env:
PY_COLORS: "1"
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Code Format Check with Black
id: black-check
run: |
black --check --verbose .
- name: Format with Black
id: black-format
if: ${{ steps.black-check.outcome == 'failure' }}
run: |
black --verbose .
- name: Commit Formatted Code
if: ${{ steps.black-check.outcome == 'failure' }}
uses: EndBug/add-and-commit@v5
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
message: "Format code with black"
# Ref https://git-scm.com/docs/git-add#_examples
add: './*.py'
test:
needs: format
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
experimental: [false]
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
include:
- python-version: 3.10.0-alpha.7 # Newest: https://github.com/actions/python-versions/blob/main/versions-manifest.json
os: ubuntu-latest
experimental: true
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with pytest via tox
run: |
tox -e gh
I did not test this of course. |
Removing this from the milestone since it does not really have something to do with the release. I just added it to not forget that there were may improvements to the CI setup. |
Is there anything to do here? |
Travis-CI has been slow of late, although this might improve now we have migrated to travis-ci.com
In #591 I suggested we add support for arm by using Shippable. In #705 @karlding added arm64 support using travis-ci.
In #661 @karlding proposed moving to Azure Pipelines.
In #940 @felixdivo proposed:
The text was updated successfully, but these errors were encountered: