Skip to content

Commit ef2843c

Browse files
committed
Updated for PyTest and Poetry
1 parent 5df638d commit ef2843c

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

.github/workflows/workflow.yaml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on:
44
branches:
55
- master
66
paths-ignore:
7-
- 'README.md'
8-
- '.vscode/**'
9-
- '.devcontainers/**'
7+
- 'README.md'
8+
- '.vscode/**'
9+
- '.devcontainers/**'
1010

1111
pull_request:
1212
branches:
1313
- master
1414
paths-ignore:
15-
- 'README.md'
16-
- '.vscode/**'
17-
- '.devcontainers/**'
15+
- 'README.md'
16+
- '.vscode/**'
17+
- '.devcontainers/**'
1818

1919
jobs:
2020
build:
@@ -24,35 +24,32 @@ jobs:
2424
# Required services
2525
services:
2626
redis:
27-
image: redis
27+
image: redis:6-alpine
2828
options: >-
2929
--health-cmd "redis-cli ping"
3030
--health-interval 10s
3131
--health-timeout 5s
3232
--health-retries 5
3333
3434
steps:
35-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3636

37-
- name: Install Python dependencies
37+
- name: Install dependencies
3838
run: |
39-
python -m pip install --upgrade pip wheel
40-
pip install -r requirements.txt
39+
python -m pip install poetry
40+
poetry config virtualenvs.create false
41+
poetry install
4142
4243
- name: Linting
4344
run: |
44-
# stop the build if there are Python syntax errors or undefined names
4545
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics
46-
# check for omplexity. The GitHub editor is 127 chars wide
4746
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics
48-
# Run pylint on the service and tests folders only
4947
pylint service tests --max-line-length=127
5048
51-
- name: Run unit tests with green
52-
run: green
49+
- name: Run unit tests with PyTest
50+
run: pytest
5351
env:
5452
DATABASE_URI: "redis://redis:6379/0"
55-
RETRY_COUNT: 2
5653

5754
- name: Upload code coverage
5855
uses: codecov/codecov-action@v3.1.4

0 commit comments

Comments
 (0)