Skip to content

Commit dda822e

Browse files
adds github actions CI
1 parent 2daf9b9 commit dda822e

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tests
2+
3+
on: [push]
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', '3.10' ]
11+
12+
name: Python ${{ matrix.python-version }}
13+
steps:
14+
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup timezone
18+
uses: zcong1993/setup-timezone@master
19+
with:
20+
timezone: UTC
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
28+
- name: Install poetry
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install poetry
32+
33+
- name: Install dependencies
34+
shell: bash
35+
run: python -m poetry install
36+
37+
- name: Test with pytest
38+
run: |
39+
python -m poetry run pytest
40+
41+
- name: Check coverage
42+
run: |
43+
python -m poetry run pytest --cov=pythonanywhere_core --cov-fail-under=65

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ keywords = ["pythonanywhere", "api", "cloud", "web hosting"]
1818

1919
[tool.poetry.dependencies]
2020
python = "^3.6"
21-
pytest = "^6.2.4"
21+
pytest = "^7.0.0"
2222
requests = "^2.25.1"
23+
pytest-cov = "^3.0.0"
2324

2425
[tool.poetry.dev-dependencies]
25-
pytest = "^6.2.4"
26+
pytest = "^7.0.0"
2627
pytest-mock = "^3.6.1"
2728
responses = "^0.13.3"
2829

0 commit comments

Comments
 (0)