Skip to content

Commit 7aca4a6

Browse files
GH actions
1 parent 0c5f0b9 commit 7aca4a6

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed

.github/workflows/unittests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7']
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[test]
22+
- name: Test with pytest
23+
run: |
24+
pytest --durations=0 --cov=./
25+
- name: Upload coverage to Codecov
26+
uses: codecov/codecov-action@v1

.github/workflows/verification.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Static Checks
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: '3.9'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install .[test]
18+
- name: Lint with flake8
19+
run: |
20+
flake8 asyncstdlib unittests
21+
- name: Format with black
22+
run: |
23+
black asyncstdlib unittests --diff --check

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ requires = ["typing_extensions; python_version<'3.8'"]
2020

2121
[tool.flit.metadata.requires-extra]
2222
test = [
23-
"pytest >=4.3.0",
23+
"pytest",
2424
"flake8",
2525
"flake8-bugbear",
2626
"black; implementation_name=='cpython'",
27-
"coverage"
27+
"coverage",
28+
"pytest-cov",
2829
]
2930
doc = ["sphinx", "sphinxcontrib-contentui", "sphinxcontrib-trio"]
3031

0 commit comments

Comments
 (0)