-
Notifications
You must be signed in to change notification settings - Fork 60
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
Replace template CI from AppVeyor -> GitHub Actions #62
Conversation
8138a15
to
79a238e
Compare
AFAIK it supports all platforms, in fact GH Actions runs on Azure. But definitely using GA is the way to go here. 👍 |
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.
Nice work!
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: '3.8' | ||
tox-env: 'py38' | ||
- python-version: '3.9' | ||
tox-env: 'py39' | ||
- python-version: '3.10' | ||
tox-env: 'py310' | ||
- python-version: '3.11' | ||
tox-env: 'py311' | ||
- python-version: '3.12' | ||
tox-env: 'py312' | ||
- python-version: 'pypy-3.8' | ||
tox-env: 'pypy3' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: {% raw -%}${{ matrix.python-version }}{% endraw %} | ||
|
||
- name: Install tox | ||
run: pip install tox | ||
|
||
- name: Test | ||
run: tox -e {% raw -%}${{ matrix.tox-env }}{% endraw -%} |
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.
tox -e py
runs using the current interpreter, so this can be simplified:
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.8' | |
tox-env: 'py38' | |
- python-version: '3.9' | |
tox-env: 'py39' | |
- python-version: '3.10' | |
tox-env: 'py310' | |
- python-version: '3.11' | |
tox-env: 'py311' | |
- python-version: '3.12' | |
tox-env: 'py312' | |
- python-version: 'pypy-3.8' | |
tox-env: 'pypy3' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: {% raw -%}${{ matrix.python-version }}{% endraw %} | |
- name: Install tox | |
run: pip install tox | |
- name: Test | |
run: tox -e {% raw -%}${{ matrix.tox-env }}{% endraw -%} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: {% raw -%}${{ matrix.python-version }}{% endraw %} | |
- name: Install tox | |
run: pip install tox | |
- name: Test | |
run: tox -e py |
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 never seen that raw
directive in python-version
, what is that for?
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.
Updated, thanks.
The raw
is escaping for the Jinja template language which cookiecutter uses, otherwise the ${{ .. }}
is interpreted by Jinja.
79a238e
to
0ce0aaa
Compare
This is the more common/easier choice these days, and also doesn't run only on windows(?).