Skip to content

Commit

Permalink
Converted to Pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrano committed Sep 2, 2023
1 parent f75ea9e commit 3960363
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --upgrade pip wheel poetry
sudo poetry config virtualenvs.create false
sudo poetry install
- name: Linting
run: |
Expand All @@ -58,7 +59,7 @@ jobs:
- name: Run unit tests with green
run: |
export FLASK_APP=service:app
green
pytest
env:
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: ## Run the linter

test: ## Run the unit tests
$(info Running tests...)
green -vvv --processes=1 --run-coverage --termcolor --minimum-coverage=95
pytest --disable-warnings

##@ Runtime

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ disable = "no-member,protected-access,global-statement"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--pspec --cov=service --disable-warnings"
addopts = "--pspec --cov=service"
testpaths = ["tests"]

[tool.coverage.run]
Expand Down

0 comments on commit 3960363

Please sign in to comment.