Skip to content

test: add cross-platform build matrix #3095

test: add cross-platform build matrix

test: add cross-platform build matrix #3095

Workflow file for this run

name: dapr-python
on:
push:
branches:
- feature/*
pull_request:
branches:
- main
- release-*
- feature/*
workflow_dispatch:
merge_group:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Run Autoformatter
run: |
tox -e ruff
statusResult=$(git status -u --porcelain)
if [ -z "$statusResult" ]
then
exit 0
else
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
exit 1
fi
build:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python_version: "3.10"
tox_env: py310
- os: ubuntu-latest
python_version: "3.11"
tox_env: py311
- os: ubuntu-latest
python_version: "3.12"
tox_env: py312
- os: ubuntu-latest
python_version: "3.13"
tox_env: py313
- os: ubuntu-latest
python_version: "3.14"
tox_env: py314
- os: windows-latest
python_version: "3.10"
tox_env: py310
- os: windows-latest
python_version: "3.13"
tox_env: py313
- os: macos-latest
python_version: "3.10"
tox_env: py310
- os: macos-latest
python_version: "3.13"
tox_env: py313
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
- name: Check Typing
if: matrix.os == 'ubuntu-latest'
run: |
tox -e type
- name: Run unit-tests
run: |
tox -e ${{ matrix.tox_env }}
- name: Upload test coverage
uses: codecov/codecov-action@v6