From 927fb3267e327ce1ba183db0e54c7d2ccd93ecc6 Mon Sep 17 00:00:00 2001 From: Norwid Behrnd Date: Wed, 2 Apr 2025 15:21:28 +0200 Subject: [PATCH] ci: add a pytest.yml Pytest defined checks are moderated by a CI. Signed-off-by: Norwid Behrnd --- .github/workflows/pytest.yml | 48 ++++++++++++++++++++++++++++++++++++ requirements-dev.txt | 1 + 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/pytest.yml create mode 100644 requirements-dev.txt diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..ef27ebd --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,48 @@ +name: CI_pytest_date2name + +# name : pytest.yml +# purpose : regularly run pytest on date2name +# date : [2025-04-02 Wed] +# edit : + +on: + push: + branches: + - master # additions to the principal branch + - dev # additions to the branch of development + pull_request: + branches: + - master # PRs to enter the principal branch + workflow_dispatch: # provide a manual trigger + # schedule: + # - cron: "0 0 1 * *" # once each 1st of a month, at 00:00 UTC (cf. https://crontab.guru/) + +jobs: + test: + strategy: + matrix: + # for a factorial test, an explicit selection of GitHUb runner images + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + # state of commit 23478d3 as visited on 2024-11-11 Mon + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.13"] + runs-on: ${{ matrix.os }} + + timeout-minutes: 5 # Timeout for each job individually + + steps: + - uses: actions/checkout@v4 + # by [2024-10-23 Wed], this version possibly will be considered "old", cf. + # https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/ + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies with PyPI + run: pip install -r requirements-dev.txt + + - name: run the check by pytest + run: | + python -m pytest -v + diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..e079f8a --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1 @@ +pytest