From a88ec0a0344719525b6ecd5a6767e8dfd8851003 Mon Sep 17 00:00:00 2001 From: Mike Foster Date: Wed, 15 Nov 2023 09:46:57 +0100 Subject: [PATCH] run pytest on push --- .github/workflows/CI.yaml | 22 ++++++++++++++++++++++ test/test_GitHubActions.py | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/CI.yaml create mode 100644 test/test_GitHubActions.py diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..97ee5c5 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,22 @@ +on: [push] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html \ No newline at end of file diff --git a/test/test_GitHubActions.py b/test/test_GitHubActions.py new file mode 100644 index 0000000..d793007 --- /dev/null +++ b/test/test_GitHubActions.py @@ -0,0 +1,2 @@ +def test_pass(): + assert True \ No newline at end of file