diff --git a/.Pipelines/CI-AND-RELEASE-PIPELINES.md b/.Pipelines/CI-AND-RELEASE-PIPELINES.md index 11a9baeb..d19ec5fb 100644 --- a/.Pipelines/CI-AND-RELEASE-PIPELINES.md +++ b/.Pipelines/CI-AND-RELEASE-PIPELINES.md @@ -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 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f34f7753..5f9f1f4c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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: @@ -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 diff --git a/doc/python_version_support_policy.md b/doc/python_version_support_policy.md index 26fcb68d..9672e59b 100644 --- a/doc/python_version_support_policy.md +++ b/doc/python_version_support_policy.md @@ -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. 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