name: Matrix 

on:
  workflow_dispatch:
    
jobs:
  run-tests:
    strategy:
      fail-fast: true
      matrix:
        os: [ubuntu-20.04, ubuntu-22.04]
        python-version: ['3.8', '3.10']
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout source code 
        uses: actions/checkout@v4

      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: "${{ matrix.python-version }}"
        
      - name: Install tox
        run: pip install tox
        
      - name: Run unit tests
        run: |
          cd backend
          tox -e unit