68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
# Cancel active CI runs for a PR before starting another run
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash # https://github.com/beeware/briefcase/pull/912
|
|
|
|
env:
|
|
FORCE_COLOR: "1"
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: Pre-commit checks
|
|
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
|
|
|
|
unit-tests:
|
|
name: Unit tests
|
|
needs: [ pre-commit ]
|
|
runs-on: ${{ matrix.platform }}
|
|
continue-on-error: ${{ matrix.experimental || false }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ "macos-13", "macos-latest", "windows-latest", "ubuntu-24.04" ]
|
|
python-version: [ "3.9", "3.13", ]
|
|
include:
|
|
# Ensure the Python versions between min and max are tested
|
|
- platform: "ubuntu-24.04"
|
|
python-version: "3.10"
|
|
- platform: "ubuntu-24.04"
|
|
python-version: "3.11"
|
|
- platform: "ubuntu-24.04"
|
|
python-version: "3.12"
|
|
# Allow dev Python to fail without failing entire job
|
|
- platform: "ubuntu-24.04"
|
|
python-version: "3.14"
|
|
experimental: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5.4.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
allow-prereleases: true
|
|
|
|
- name: Install Tox
|
|
uses: beeware/.github/.github/actions/install-requirement@main
|
|
with:
|
|
requirements: tox
|
|
extra: dev
|
|
|
|
- name: Test
|
|
id: test
|
|
run: |
|
|
tox -e py
|