Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add support for multi-environment builds #23

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
# 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"]