Try building flatpaks #1254
Workflow file for this run
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-package: | |
runs-on: ubuntu-latest | |
outputs: | |
wheel-name: ${{ steps.build-package.outputs.wheel-name }} | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build package | |
id: build-package | |
uses: ./.github/actions/build-package | |
test: | |
needs: build-package | |
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 wheel | |
uses: actions/download-artifact@v3 | |
id: download-wheel | |
with: | |
name: ${{ needs.build-package.outputs.wheel-name }} | |
path: ./dist | |
- name: Prepare environment | |
uses: ./.github/actions/prepare-ci | |
- name: Run tests (latest) | |
run: >- | |
nox | |
--error-on-missing-interpreters | |
--force-python ${{ matrix.python-version }} | |
-s 'test-${{ matrix.python-version }}(latest)' | |
-- '${{ steps.download-wheel.outputs.download-path }}/${{ needs.build-package.outputs.wheel-name }}' | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-data | |
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)' | |
-- '${{ steps.download-wheel.outputs.download-path }}/${{ needs.build-package.outputs.wheel-name }}' | |
type-check: | |
needs: build-package | |
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 wheel | |
uses: actions/download-artifact@v3 | |
id: download-wheel | |
with: | |
name: ${{ needs.build-package.outputs.wheel-name }} | |
path: ./dist | |
- name: Prepare environment | |
uses: ./.github/actions/prepare-ci | |
- name: Install Node for Pyright | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Type check | |
run: >- | |
nox | |
--error-on-missing-interpreters | |
--force-python ${{ matrix.python-version }} | |
-s type_check | |
-- '${{ steps.download-wheel.outputs.download-path }}/${{ needs.build-package.outputs.wheel-name }}' | |
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: "18" | |
- 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@v3 | |
with: | |
name: coverage-data | |
- 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@v3 | |
with: | |
name: html-report | |
path: htmlcov |