Update changelog #1366
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: "1" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-packages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build packages | |
uses: ./.github/actions/build-packages | |
test: | |
needs: build-packages | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.11", "3.12"] | |
include: | |
- { os: ubuntu-latest, python-version: "3.10" } | |
- os: ubuntu-latest | |
python-version: "3.13" | |
python-install-version: "3.13-dev" | |
- os: ubuntu-latest | |
python-version: "3.13" | |
python-install-version: "3.13-dev" | |
python-free-threaded: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
- name: Download pre-built packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
path: ./dist | |
- name: Install nox | |
run: pipx install nox uv | |
shell: bash | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-install-version || matrix.python-version }} | |
if: ${{ !matrix.python-free-threaded }} | |
- name: Install Python ${{ matrix.python-version }} | |
uses: deadsnakes/action@v3.1.0 | |
with: | |
python-version: ${{ matrix.python-install-version || matrix.python-version }} | |
nogil: true | |
if: ${{ matrix.python-free-threaded }} | |
- name: Run tests (latest) | |
run: >- | |
nox | |
--error-on-missing-interpreters | |
--force-python ${{ matrix.python-version }} | |
-s 'test-${{ matrix.python-version }}(latest)' | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }}${{ matrix.python-free-threaded && 't' || '' }} | |
path: .coverage.* | |
if-no-files-found: ignore | |
- name: Run tests (minimum versions) | |
run: >- | |
nox | |
--error-on-missing-interpreters | |
--force-python ${{ matrix.python-version }} | |
-s 'test-${{ matrix.python-version }}(minimum-versions)' | |
type-check: | |
needs: build-packages | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.11", "3.12"] | |
include: | |
- { os: ubuntu-latest, python-version: "3.10" } | |
- os: ubuntu-latest | |
python-version: "3.13" | |
python-install-version: "3.13-dev" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
- name: Download pre-built packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
path: ./dist | |
- name: Install nox | |
run: pipx install nox uv | |
shell: bash | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-install-version || matrix.python-version }} | |
- name: Install Node for Pyright | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Type check | |
run: >- | |
nox | |
--error-on-missing-interpreters | |
--force-python ${{ matrix.python-version }} | |
-s type_check | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
- name: Install nox | |
run: pipx install nox uv | |
- name: Install Node for Prettier | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Lint | |
run: nox -s lint | |
# Nicked from attrs. | |
coverage: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
- name: Download coverage data | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-data-* | |
merge-multiple: true | |
- name: Install nox | |
run: pipx install nox uv | |
- name: Produce coverage report | |
run: | | |
nox -s produce_coverage_report | |
- name: Upload HTML report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-report | |
path: htmlcov |