Skip to content

Commit

Permalink
Add black and pytest GitHub actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
not-na committed May 4, 2024
1 parent 647bf8c commit ec805c6
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
20 changes: 20 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test plausibility and completeness

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.2"
- name: Test with pytest
run: |
poetry run poe test-ci
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea/
*/__pycache__/*
*.pyc
*.pyc

junit/
.coverage
84 changes: 83 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ poethepoet = "^0.25.1"

[tool.poetry.group.dev.dependencies]
pytest = "^8.1.1"
pytest-cov = "^5.0.0"

[tool.poe.tasks]
test = "pytest"
test-ci = "pytest --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit ec805c6

Please sign in to comment.