Add Github CI test workflow

This commit is contained in:
Patrick Robertson
2024-12-31 15:20:33 +01:00
parent 33e967ce4b
commit 1bd017000e

40
.github/workflows/unit-tests.yaml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Tests
on:
push:
branches: [ main, staging ]
paths:
- src/**
pull_request:
branches: [ main, staging ]
paths:
- src/**
jobs:
test_back:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Package (Local)
run: |
python -m pip install --upgrade pip
pip install .
- name: Make envfile
uses: SpicyPizza/create-envfile@v1.3
with:
envkey_EXAMPLE: "example env value - if we will use it (?)"
directory: ./
- name: Run Tests
run: |
python -m unittest