Skip to content

Adding github action for CI #7

Adding github action for CI

Adding github action for CI #7

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python CI
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11.9
uses: actions/setup-python@v3
if: ${{ hashFiles('./test') != '' }}
with:
python-version: "3.11.9"
- name: Install dependencies
if: ${{ hashFiles('./test') != '' }}
run: |
python -m pip install --upgrade pip
if [ -f system/requirements/requirements_unit_test.txt ]; then
pip install -r system/requirements/requirements_unit_test.txt;
fi
- name: Test with pytest
if: ${{ hashFiles('./test') != '' }}
run: |
pytest test --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html