Skip to content
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
6 changes: 3 additions & 3 deletions .Pipelines/CI-AND-RELEASE-PIPELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ including what each pipeline does, when it runs, and how to trigger a release.
| Push / merge | `dev` |
| Scheduled | Daily at 11:45 PM Pacific, `dev` branch (only when there are new changes) |

Fast unit-test feedback for PRs targeting **other** branches (e.g. `release-x.y.z`)
is provided separately by the GitHub Actions workflow
Package build verification for PRs targeting any branch is provided separately
by the GitHub Actions workflow
[`.github/workflows/python-package.yml`](../.github/workflows/python-package.yml),
which runs the package build and unit tests on every PR.
which builds the package and runs `twine check` on every PR.

### Stages

Expand Down
50 changes: 7 additions & 43 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Build verification + unit tests for the msal Python package.
# Build verification for the msal Python package.
#
# This workflow runs on every PR (against any target branch) to give contributors
# fast feedback that the package still builds and that the unit tests pass across
# all supported Python versions.
# fast feedback that the package still builds and that the distribution metadata
# passes `twine check`.
#
# Post-merge validation on dev, E2E tests, benchmarks, SDL scans, and PyPI
# publishing are NOT run here. Those run in the ADO pipelines:
# - azure-pipelines.yml (PRs + pushes to dev: unit + E2E + SDL)
# Unit tests, E2E tests, benchmarks, SDL scans, and PyPI publishing are NOT run
# here. Those run in the IDDP/ADO pipelines:
# - azure-pipelines.yml (PRs + pushes: unit + E2E + benchmarks + SDL)
# - .Pipelines/pipeline-publish.yml (manual release to TestPyPI / PyPI)

name: Build and Unit Tests
name: Build

on:
pull_request:
Expand Down Expand Up @@ -43,39 +43,3 @@ jobs:
name: dist
path: dist/
retention-days: 7

ci:
name: Unit tests Python ${{ matrix.python-version }}
permissions:
contents: read

runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
# It automatically takes care of pip cache, according to
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#about-caching-workflow-dependencies
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Run unit tests
# Skip benchmarks and E2E tests — those require lab credentials and run in ADO.
run: |
pytest tests/ \
--benchmark-skip \
--ignore=tests/test_e2e.py \
--ignore=tests/test_e2e_manual.py \
--ignore=tests/test_fmi_e2e.py
4 changes: 2 additions & 2 deletions doc/python_version_support_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ kept in sync with this policy:
1. **`setup.cfg`** — `python_requires`, the `Programming Language ::
Python :: 3.x` trove classifiers, and any `python_version`
environment markers on optional dependencies (e.g. `pymsalruntime`).
2. **`.github/workflows/python-package.yml`** — the `python-version`
matrix used by the `pytest` test job.
2. **`azure-pipelines.yml`** and **`.Pipelines/template-pipeline-stages.yml`**
— the `python-version` matrix used by the PR-gate unit and E2E test stages.
Comment thread
gladjohn marked this conversation as resolved.
3. **`tests/test_cryptography.py`** — the N+3 ceiling test that enforces
tracking the latest `cryptography` release. Newer `cryptography`
versions routinely drop EOL Python versions, which is the most common
Expand Down
Loading