Skip to content

Commit

Permalink
Add a basic test and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
davegaeddert committed Jul 9, 2024
1 parent 7d4c4f9 commit 76635ca
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test

on: [push]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
- run: poetry install
- run: |
poetry run plain compile
poetry run plain test
env:
PLAIN_DEBUG: true
PLAIN_SECRET_KEY: testing
Empty file added app/tests/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions app/tests/test_urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def test_homepage_exists(client):
response = client.get("/")
assert response.status_code in (200, 301, 302)
69 changes: 65 additions & 4 deletions poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plainframework = "<1.0.0"

[tool.poetry.group.dev.dependencies]
"plain.dev" = "<1.0.0"
"plain.pytest" = "<1.0.0"

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

0 comments on commit 76635ca

Please sign in to comment.