From e12705193f3a7f00c91a596e9c7f5a29a899d5c4 Mon Sep 17 00:00:00 2001 From: Chris Addy Date: Sat, 17 May 2025 19:41:40 -0400 Subject: [PATCH 1/2] CI: add OS matrix --- .github/workflows/quality.yaml | 25 ++++++++++++++++++------- .github/workflows/test.yaml | 29 +++++++++++++++++++---------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index bef8a40d1..2191b5e07 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -4,14 +4,25 @@ on: push jobs: python_quality_check: - name: Run Python quality checks - runs-on: macos-latest + name: Run Python quality checks (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install Flox - uses: flox/install-flox-action@v2 - - name: Run Python quality checks - uses: flox/activate-action@v1 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.13" + - name: Install uv + uses: astral-sh/setup-uv@v3 + - name: Setup Mise + uses: jdx/mise-action@v2 with: - command: mise tasks run python:lint + install: true + install_args: "-y" + experimental: true + - name: Run Python quality checks + run: mise tasks run python:lint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index cdc1ef55b..63380220e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,21 +4,30 @@ on: push jobs: python_test_and_coverage: - name: Run Python tests - runs-on: macos-latest + name: Run Python tests (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install Flox - uses: flox/install-flox-action@v2 - - name: Install Python dependencies - uses: flox/activate-action@v1 + - name: Setup Python + uses: actions/setup-python@v4 with: - command: mise tasks run python:install - - name: Run unit tests with coverage - uses: flox/activate-action@v1 + python-version: "3.13" + - name: Install uv + uses: astral-sh/setup-uv@v3 + - name: Setup Mise + uses: jdx/mise-action@v2 with: - command: mise tasks run python:test + install: true + install_args: "-y" + experimental: true + - name: Install Python dependencies + run: mise tasks run python:install + - name: Run unit tests with coverage + run: mise tasks run python:test - name: Upload coverage to Coveralls uses: coverallsapp/github-action@v2 with: From ed611c450c4bc35bb34791eb821df36c226b3b1b Mon Sep 17 00:00:00 2001 From: Chris Addy Date: Sun, 18 May 2025 12:41:23 -0400 Subject: [PATCH 2/2] CI: use flox --- .github/workflows/quality.yaml | 18 +++++------------- .github/workflows/test.yaml | 22 ++++++++-------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 2191b5e07..ea995fb73 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -12,17 +12,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.13" - - name: Install uv - uses: astral-sh/setup-uv@v3 - - name: Setup Mise - uses: jdx/mise-action@v2 - with: - install: true - install_args: "-y" - experimental: true + - name: Install Flox + uses: flox/install-flox-action@v2 - name: Run Python quality checks - run: mise tasks run python:lint + uses: flox/activate-action@v1 + with: + command: mise tasks run python:lint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 63380220e..3ca78d1fe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,22 +12,16 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: "3.13" - - name: Install uv - uses: astral-sh/setup-uv@v3 - - name: Setup Mise - uses: jdx/mise-action@v2 - with: - install: true - install_args: "-y" - experimental: true + - name: Install Flox + uses: flox/install-flox-action@v2 - name: Install Python dependencies - run: mise tasks run python:install + uses: flox/activate-action@v1 + with: + command: mise tasks run python:install - name: Run unit tests with coverage - run: mise tasks run python:test + uses: flox/activate-action@v1 + with: + command: mise tasks run python:test - name: Upload coverage to Coveralls uses: coverallsapp/github-action@v2 with: