-
Notifications
You must be signed in to change notification settings - Fork 40
GitHub Actions workflow #130
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - python-version: "3.6" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Python 3.6/3.7 are ancient and EOL. You mentioned in the issue to start using 3.10 (which was the right call), why not following through with it? :) |
||
| tox-env: py36 | ||
| container-image: python:3.6-buster | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is using container images because Also, debian buster is EOL since 2024. |
||
| - python-version: "3.7" | ||
| tox-env: py37 | ||
| container-image: python:3.7-buster | ||
| container: | ||
| image: ${{ matrix.container-image }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Cache pip downloads | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /root/.cache/pip | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect this is less useful than it could be. tox creates virtualenvs for testing, but the |
||
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | ||
|
|
||
| - name: Install CI tools (Travis before_script parity) | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -U poetry tox-travis codecov tox | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the point of tox-travis in a Github Actions setup? |
||
|
|
||
| - name: Run tests via tox | ||
| run: tox -e "${{ matrix.tox-env }}" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no |
||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| files: .coverage | ||
| flags: ${{ matrix.tox-env }} | ||
| fail_ci_if_error: false | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
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.
I think
on: push+on: pull_requestwithout branch filters means every PR triggers two different workflow runs. What about filtering withpush: branches: [main]?