Skip to content
Merged
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
132 changes: 116 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,21 @@ jobs:
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
exit 1

ci:
needs: permissions-check
environment:
name: build-pipeline
check:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.12', '3.13', '3.14']
task: [check, test, format]
exclude:
- os: windows-latest
python-version: '3.13'
- os: windows-latest
python-version: '3.14'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.task }} (py ${{ matrix.python-version }})
name: ${{ matrix.os }} check (py ${{ matrix.python-version }})

steps:
- uses: actions/checkout@v4
Expand All @@ -82,34 +78,138 @@ jobs:
run: |
uv sync --extra dev

- name: Run Check
- name: Run Check (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
make check

- name: Run Check (Windows)
if: runner.os == 'Windows'
run: |
./make.bat check

format:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.12', '3.13', '3.14']
exclude:
- os: windows-latest
python-version: '3.13'
- os: windows-latest
python-version: '3.14'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} format (py ${{ matrix.python-version }})

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install Dependencies
shell: bash
if: matrix.task == 'check'
run: |
uv run pyright src tests tools examples
uv sync --extra dev

- name: Run Format
- name: Run Format (Linux)
if: runner.os == 'Linux'
shell: bash
if: matrix.task == 'format'
run: |
uv run black -tpy312 -tpy313 -tpy314 src tests tools examples --check
make format

- name: Run Format (Windows)
if: runner.os == 'Windows'
run: |
./make.bat format

offline-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.12', '3.13']
exclude:
- os: windows-latest
python-version: '3.13'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (py ${{ matrix.python-version }})

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install Dependencies
shell: bash
run: |
uv sync --extra dev

- name: Run Test
shell: bash
run: |
uv run pytest

online-test:
needs: permissions-check
environment:
name: build-pipeline
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.14']
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (py ${{ matrix.python-version }})

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install Dependencies
shell: bash
run: |
uv sync --extra dev

- name: Login to Azure
if: matrix.task == 'test'
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }}

- name: Get Keys
if: matrix.task == 'test'
run: |
uv run python tools/get_keys.py --vault build-pipeline-kv

- name: Run Test
shell: bash
if: matrix.task == 'test'
run: |
uv run pytest

Expand Down