diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..10f4165 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,62 @@ +name: Tests + +# The suite runs twice: without the binder checkout (its tests skip) and with +# python-multiplatform develop beside it. The tests only read three Kotlin +# source files from it, so no JVM or Gradle is needed. +on: + pull_request: + branches: [develop] + push: + branches: ['work/**'] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + no-binder: + runs-on: ubuntu-latest + env: + # A path that does not exist, so the binder tests skip. + PYTHONMULTIPLATFORM_HOME: /nonexistent + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: pip install pytest setuptools wheel + - name: Run the suite + run: python -m pytest tests -q -rs + + with-binder: + runs-on: ubuntu-latest + env: + # The two repositories side by side, as on a developer machine. The binder is not checked out + # inside this one: tests/test_wheel.py copies this repository to build the wheel. + PYTHONMULTIPLATFORM_HOME: ${{ github.workspace }}/python-multiplatform + defaults: + run: + working-directory: pythonx-compose + steps: + - uses: actions/checkout@v4 + with: + path: pythonx-compose + fetch-depth: 1 + - uses: actions/checkout@v4 + with: + repository: thisisthepy/python-multiplatform + ref: develop + path: python-multiplatform + fetch-depth: 1 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: pip install pytest setuptools wheel + - name: Run the suite + run: python -m pytest tests -q -rs diff --git a/AGENTS.md b/AGENTS.md index b205170..aa8cfe5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -187,6 +187,9 @@ worktree so a test can see it. Read it in place. one they **skip**; with a checkout older than python-multiplatform `ba4c6f49`, 5 of them skip for want of its member resolver (see `docs/SPEC.md` ยง0). Report both numbers and say which environment you ran in. A skip is not a pass. +- The suite runs on GitHub Actions (`.github/workflows/tests.yml`) in both environments, without and + with a python-multiplatform checkout, for every pull request into `develop`. Local runs are for + quick checks of the part you changed; leave the full two-environment run to CI. - `PythonMultiplatform` is read-only from this repository. Never write to it from here. - Record the before and after counts of every change; a change that only touches documentation must leave them identical.