Skip to content

Commit 1b51f36

Browse files
committed
Refs #79. Unify CI & local testing process
1 parent 05230ea commit 1b51f36

3 files changed

Lines changed: 12 additions & 28 deletions

File tree

.github/workflows/code_quality.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,23 @@ jobs:
2525
matrix:
2626
os: [ubuntu-latest]
2727
python-version:
28-
- '3.6'
29-
- '3.7'
30-
- '3.8'
31-
- '3.9'
28+
- 'py36'
29+
- 'py37'
30+
- 'py38'
31+
- 'py39'
3232
- 'pypy3'
33-
include:
33+
# include:
34+
# TODO #81 CI pipline for other OSes
3435
# - os: windows-latest
35-
# python-version: 3.8
36-
- os: macos-latest
37-
python-version: 3.8
36+
# python-version: 38
37+
# - os: macos-latest
38+
# python-version: 38
3839
steps:
3940

4041
- uses: actions/checkout@v2
4142

42-
- name: Set up Python ${{ matrix.python-version }}
43-
uses: actions/setup-python@v2
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
47-
- name: Install Poetry
48-
uses: snok/install-poetry@v1.1.1
49-
with:
50-
virtualenvs-create: true
51-
virtualenvs-in-project: true
52-
53-
- name: Install dependencies
54-
run: poetry install --no-interaction
55-
56-
- name: Run tests
57-
run: poetry run pytest --cov --cov-report=xml
43+
- name: Run compose to build & run tests against ${{ matrix.python-version }} container
44+
run: docker-compose run test_${{ matrix.python-version }}
5845

5946
- name: Upload coverage
6047
uses: codecov/codecov-action@v1

devops/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RUN poetry install --no-root --no-interaction
5050
ENTRYPOINT [ "/bin/bash" ]
5151

5252
FROM dev AS test
53-
ENTRYPOINT [ "pytest" ]
53+
ENTRYPOINT [ "pytest", "--cov", "--cov-report", "term", "--cov-report", "xml"]
5454

5555
FROM dev AS lint
5656
COPY .git .git

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,3 @@ exclude_lines = [
128128
# Don't complain if non-runnable code isn't run:
129129
"if __name__ == .__main__.:",
130130
]
131-
132-
[tool.coverage.xml]
133-
output = "coverage.xml"

0 commit comments

Comments
 (0)