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

Run pytest with different Python versions in GitHub actions #1033

Merged
merged 17 commits into from
Feb 19, 2022
29 changes: 17 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ name: CI
on: [push, pull_request]

jobs:
build:
test:
name: test w/ Python
Copy link
Member

Choose a reason for hiding this comment

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

Just tests should be enough. To show that it's not pypy we should say CPython, but pypy is likely to be in the matrix, so better to just name this tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right! I changed it.

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.10"]
datapythonista marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Checkout source
uses: actions/checkout@v2

- uses: actions/checkout@v2
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
pip install flake8

- name: flake8
run: flake8 .

run: pip install -r requirements-dev.txt
- name: Run tests
run: pytest

flake8-formatting:
name: code autoformatting with flake8
LucyJimenez marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: pip install flake8
- name: Check code with flake8
run: flake8 .