Skip to content

Commit 76635ca

Browse files
committed
Add a basic test and ci
1 parent 7d4c4f9 commit 76635ca

File tree

5 files changed

+91
-4
lines changed

5 files changed

+91
-4
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: test
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- run: pipx install poetry
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: "3.11"
15+
cache: poetry
16+
- run: poetry install
17+
- run: |
18+
poetry run plain compile
19+
poetry run plain test
20+
env:
21+
PLAIN_DEBUG: true
22+
PLAIN_SECRET_KEY: testing

app/tests/__init__.py

Whitespace-only changes.

app/tests/test_urls.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def test_homepage_exists(client):
2+
response = client.get("/")
3+
assert response.status_code in (200, 301, 302)

poetry.lock

Lines changed: 65 additions & 4 deletions
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
@@ -10,6 +10,7 @@ plainframework = "<1.0.0"
1010

1111
[tool.poetry.group.dev.dependencies]
1212
"plain.dev" = "<1.0.0"
13+
"plain.pytest" = "<1.0.0"
1314

1415
[build-system]
1516
requires = ["poetry-core"]

0 commit comments

Comments
 (0)