ci(pytest.yml): introduce github action on ubuntu

This commit aims to provide an automated testing with pytest moderated
by GitHub actions.  Its scope is constrained twice -- both for pytest,
as well as for the testing operating system -- to familiarize

1) how to file a PR to project I don't own which however now allows
   me to admit a PR.
2) To learn if in this situation a contributor can set GitHub actions
   in a repository owned by an other user.

Signed-off-by: Norwid Behrnd <nbehrnd@yahoo.com>
This commit is contained in:
Norwid Behrnd 2024-10-31 11:27:03 +01:00
parent a2a9323063
commit d79ba9d954

37
.github/workflows/pytest.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: CI_pytest_appendfilename
# name : pytest.yml
# purpose : regularly run pytest on appendfilename
# date : [2024-10-31 Thu]
# edit :
on:
push:
branches:
- master # additions to the principal branch "master"
pull_request:
branches:
- master # PRs to enter the principal branch "master"
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-ubuntu:
runs-on: ubuntu-24.04
timeout-minutes: 2
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: '3.x'
- name: Install dependencies with PyPI
run: pip install -r requirements.txt
- name: run the check by pytest
run: python -m pytest