diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..f9c3403 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,31 @@ +name: Python Unittest on Push and PR + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.10] # Currently testing only with 3.10, but easy to add more + + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run unittests + run: python -m unittest discover -s tests