Skip to content

Commit 66b0cac

Browse files
committed
Updated CI to new dev tools (poetry)
1 parent 09f7452 commit 66b0cac

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,51 @@ on:
33
push:
44
branches:
55
- master
6+
paths-ignore:
7+
- 'README.md'
68
pull_request:
79
branches:
810
- master
11+
paths-ignore:
12+
- 'README.md'
913

1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest
13-
container: python:3.9-slim
17+
container: python:3.11-slim
1418

1519
# Required services
1620
services:
1721
redis:
1822
image: redis:6-alpine
1923
ports:
2024
- 6379:6379
25+
options: >-
26+
--health-cmd "redis-cli ping"
27+
--health-interval 10s
28+
--health-timeout 5s
29+
--health-retries 5
2130
2231
steps:
2332
- name: Checkout code
24-
uses: actions/checkout@v2
25-
33+
uses: actions/checkout@v3
34+
2635
- name: Install Python dependencies
2736
run: |
28-
python -m pip install --upgrade pip wheel
29-
pip install -r requirements.txt
37+
python -m pip install --upgrade pip poetry
38+
poetry config virtualenvs.create false
39+
poetry install
3040
3141
- name: Linting
3242
run: |
33-
# stop the build if there are Python syntax errors or undefined names
3443
flake8 service --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3644
flake8 service --count --max-complexity=10 --max-line-length=127 --statistics
45+
pylint service --max-line-length=127
3746
38-
- name: Run unit tests with nose
39-
run: nosetests -v --with-spec --spec-color --with-coverage --cover-package=app
47+
- name: Run unit tests with PyTest
48+
run: pytest --pspec --cov=service --cov-fail-under=95
4049
env:
41-
DATABASE_URI: "redis://redis:6379/0"
50+
DATABASE_URI: "redis://redis:6379"
4251

4352
- name: Upload code coverage
44-
uses: codecov/codecov-action@v2
45-
with:
46-
files: ./coverage.xml
47-
flags: unittests
48-
version: "v0.1.13"
53+
uses: codecov/codecov-action@v3.1.4

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme = "README.md"
99
[tool.poetry.dependencies]
1010
python = "^3.11"
1111
Flask = "^3.0.2"
12-
redis = "^4.5.3"
12+
redis = "^4.5.4"
1313
flask-redis = "^0.4.0"
1414
python-dotenv = "^1.0.0"
1515
gunicorn = "^21.2.0"

0 commit comments

Comments
 (0)