Skip to content

Commit

Permalink
Merge pull request #23 from xames3/build/add-tox-support
Browse files Browse the repository at this point in the history
[CI] Add support for multi-environment builds
  • Loading branch information
xames3 authored Nov 22, 2024
2 parents aecf438 + 37cd9a1 commit 590865e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/multienv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Multi-Environment Testing Workflow
# ==================================
#
# Author: Akshay Mestry <xa@mes3.dev>
# Created on: Thursday, November 21 2024
# Last updated on: Thursday, November 21 2024

name: multienv-testing
run-name: Started ${{ github.workflow }}

on:
workflow_dispatch:
pull_request:
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*'

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: test with ${{ matrix.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
env:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
with:
fetch-depth: 1
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh
- name: Install Python
if: matrix.env != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Run tox suite
run: tox run -vv
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,11 @@ commands = [
["isort", "--sl", "coeus_sphinx_theme/"],
["mypy", "coeus_sphinx_theme/"],
]

[tool.tox.gh.python]
"3.13" = ["3.13", "type", "pkg_meta"]
"3.12" = ["3.12"]
"3.11" = ["3.11"]
"3.10" = ["3.10"]
"3.9" = ["3.9"]
"3.8" = ["3.8"]

0 comments on commit 590865e

Please sign in to comment.