name: Run CI-CD unit-tests 🔬

on:
  workflow_dispatch:
  push:
    branches:
      - master
      - main

  pull_request:
    branches:
      - master
      - main

jobs:
  deploy-to-production:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - name: Install Python 3
        uses: actions/setup-python@v1
        with:
          python-version: "3.10"

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Run unit tests with pytest
        run: python3 -m unittest tests
