From 22ab68a59b101fa89f79389b6369b08902cec5ef Mon Sep 17 00:00:00 2001 From: Jordan Gillard Date: Sat, 6 Apr 2024 16:23:16 -0400 Subject: [PATCH] Add GitHub action for pytest and write one test --- .github/workflows/run-pytest.yml | 29 +++++++++++++++++++++++++++++ tests/test_user_was_online.py | 5 +++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/run-pytest.yml create mode 100644 tests/test_user_was_online.py diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml new file mode 100644 index 0000000..777a95f --- /dev/null +++ b/.github/workflows/run-pytest.yml @@ -0,0 +1,29 @@ +name: Run Pytest + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + - name: Test with pytest + run: | + pytest diff --git a/tests/test_user_was_online.py b/tests/test_user_was_online.py new file mode 100644 index 0000000..74435c2 --- /dev/null +++ b/tests/test_user_was_online.py @@ -0,0 +1,5 @@ +import pytest + + +def test_should_run_this_in_ci(): + assert True