Skip to content

Commit

Permalink
Adding github action for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Paladinium committed Nov 22, 2024
1 parent 925c73a commit 1a16105
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: |
python -m unittest discover -s ./test -p 'test_*.py'
2 changes: 2 additions & 0 deletions system/requirements/requirements_unit_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
filelock>=3.16.1
pydantic>=2.7.0

0 comments on commit 1a16105

Please sign in to comment.