name: Test Workflow on: push: branches: - master pull_request: branches: - master jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10", "3.11"] # List the Python versions you want to test steps: - uses: actions/checkout@v4 - name: Install Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install poetry uses: abatilo/actions-poetry@v2 - name: Setup a local virtual environment (if no poetry.toml file) run: | poetry config virtualenvs.create true --local poetry config virtualenvs.in-project true --local - uses: actions/cache@v3 name: Define a cache for the virtual environment based on the dependencies lock file with: path: ./.venv key: venv-${{ hashFiles('poetry.lock') }} - name: Install the project dependencies run: poetry install --all-extras - name: run linter, formatters and sort imports run: | poetry run black . poetry run ruff check --output-format=github . --fix poetry run isort . --profile black - name: run type checking run: poetry run pyright - name: run tests run: poetry run pytest