Skip to content

Commit aa1319a

Browse files
committed
feat: pytest
1 parent 39aad38 commit aa1319a

File tree

5 files changed

+88
-1
lines changed

5 files changed

+88
-1
lines changed

.github/workflows/pytest.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
pytest:
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: development
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install Docker Compose
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y docker-compose
23+
24+
- name: Build the containers & Start the containers
25+
run: |
26+
docker-compose -f docker-compose.yml --env-file .env up --build -d
27+
28+
- name: Test with pytest
29+
run: |
30+
docker-compose -f docker-compose.yml --env-file .env exec -T project pytest
31+
32+
- name: Clean up
33+
if: always()
34+
run: |
35+
docker-compose -f docker-compose.yml --env-file .env down

poetry.lock

Lines changed: 49 additions & 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ flake8 = "^6.1.0"
1818
isort = "^5.12.0"
1919
ipython = "^8.15.0"
2020
ipykernel = "^6.25.2"
21+
pytest = "^8.3.2"
2122

2223
[build-system]
2324
requires = ["poetry-core"]

tests/__init__.py

Whitespace-only changes.

tests/test_default.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class TestDefault:
2+
def test_default(self):
3+
assert True

0 commit comments

Comments
 (0)