From fe02f66fb33bcb01e48eb2de96fad14659a84799 Mon Sep 17 00:00:00 2001 From: cyclotruc Date: Wed, 25 Dec 2024 01:11:56 +0000 Subject: [PATCH] Add automated Tests run on push --- .github/workflows/unitest.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/unitest.yml diff --git a/.github/workflows/unitest.yml b/.github/workflows/unitest.yml new file mode 100644 index 0000000..e1fb7eb --- /dev/null +++ b/.github/workflows/unitest.yml @@ -0,0 +1,33 @@ +name: Unit Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + 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 pytest pytest-asyncio + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install -e . + + - name: Run tests + run: | + pytest \ No newline at end of file