Skip to content

Commit

Permalink
I use pytest package as my test runner and add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmuhd-dev committed Mar 8, 2024
1 parent 70957a2 commit 2dbed11
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI Workflow

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
container: python:3.9-slim
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependecies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 service --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 service --count --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit test with pytest
run: python -m pytest
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ flake8==4.0.1
black==22.3.0

# Testing dependencies
nose==1.3.7
pinocchio==0.4.3
coverage==6.3.2
pytest==7.4.3
pytest-cov==4.1.0
coverage==7.1.0

# Utilities
httpie==3.2.1
11 changes: 4 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[nosetests]
verbosity=2
with-spec=1
spec-color=1
with-coverage=1
cover-erase=1
cover-package=service
[tool:pytest]
addopts = -vv --disable-warnings --cov=service.routes


# cover-xml=1
# cover-xml-file=./coverage.xml
# with-xunit=1
Expand Down

0 comments on commit 2dbed11

Please sign in to comment.