diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a338f99 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,40 @@ +name: Tests + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + test: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: astral-sh/setup-uv@v6 + - name: Create virtual environment + run: uv venv --python "${{ matrix.python-version }}" .venv + - name: Install test runner dependencies + run: | + # Do not use pyproject.toml's Git amplifier-core source mapping in CI. + uv pip install --no-config --python .venv/bin/python \ + "amplifier-core==1.5.2" \ + "pytest==9.0.3" \ + "pytest-asyncio==1.3.0" + # Test-only: install Foundation without dependencies so it cannot replace packaged core. + uv pip install --no-config --no-deps --python .venv/bin/python \ + "amplifier-foundation @ git+https://github.com/microsoft/amplifier-foundation.git@5fb4b292afbd99d41e304a87ffedcdd5ad83929f" + uv pip install --no-config --no-deps --python .venv/bin/python . + - name: Run full test suite, including TestProgressRecovery + run: .venv/bin/python -m pytest tests -v