diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..d0c5483 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tests + +on: + push: + branches: + - '**' + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + cache: pip + cache-dependency-path: requirements.txt + + - name: Install dependencies + run: python -m pip install -r requirements.txt + + - name: Run tests + run: make test diff --git a/README.md b/README.md index 462d93f..b4023da 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,9 @@ After installing the project dependencies, run the automated test suite: make test ``` +GitHub Actions runs the same suite with Python 3.10 on pushes to any branch and +on pull requests targeting `main`. + Override the Python interpreter if needed, for example `make test PYTHON=python3.11`. Or run test discovery directly: