Skip to content

Windows Workflows

Windows Workflows #182

name: Windows Workflows
permissions:
contents: read
pull-requests: read
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
mp: ${{ steps.filter.outputs.mp }}
integration_packages: ${{ steps.filter.outputs.integration_packages }}
response_integrations_google: ${{ steps.filter.outputs.response_integrations_google }}
response_integrations_third_party: ${{ steps.filter.outputs.response_integrations_third_party }}
playbooks: ${{ steps.filter.outputs.playbooks }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.event.pull_request.base.sha || github.event.before }}
filters: |
mp:
- 'packages/mp/**'
- '.github/workflows/**'
integration_packages:
- 'packages/envcommon/**'
- 'packages/tipcommon/**'
- 'packages/integration_testing/**'
response_integrations_google:
- 'content/response_integrations/google/**'
response_integrations_third_party:
- 'content/response_integrations/third_party/**'
- 'content/response_integrations/power_up/**'
playbooks:
- 'content/playbooks/**'
test-mp-windows:
name: 1. Test mp Package
needs: changes
if: ${{ needs.changes.outputs.mp == 'true' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
uv pip install --system pytest pytest-cov pytest-xdist hypothesis
- name: Run pytest
working-directory: packages/mp
run: python -m pytest tests -n 7 --cov
validate-integrations-windows:
name: 2a. Validate Integrations
needs: changes
if: ${{ needs.changes.outputs.mp == 'true' || needs.changes.outputs.integration_packages == 'true' || needs.changes.outputs.response_integrations_google == 'true' || needs.changes.outputs.response_integrations_third_party == 'true' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install mp
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
- name: Run Validations
shell: pwsh
run: |
wmp config --root-path . --processes 7 --display-config
wmp validate repository google third_party --only-pre-build
run-integrations-tests-windows:
name: 2b. Test Integrations
needs: validate-integrations-windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install mp
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
- name: Run integration tests
shell: pwsh
run: |
wmp config --root-path . --processes 7 --display-config
wmp test --repository third_party --repository google --raise-error-on-violations
mp-build-integrations-windows:
name: 2c. Build Integrations
needs: run-integrations-tests-windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install mp
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
- name: Build
shell: pwsh
run: |
wmp config --root-path . --processes 7 --display-config
wmp build repository google third_party
validate-playbooks-windows:
name: 3a. Validate Playbooks
needs: changes
if: ${{ needs.changes.outputs.mp == 'true' || needs.changes.outputs.playbooks == 'true' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install mp
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
- name: Run Validations
shell: pwsh
run: |
wmp config --root-path . --processes 7 --display-config
wmp validate repository playbooks --only-pre-build
mp-build-playbooks-windows:
name: 3b. Build Playbooks
needs: validate-playbooks-windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install mp
run: |
python -m pip install uv
uv pip install --system -e ./packages/mp
- name: Build
shell: pwsh
run: |
wmp config --root-path . --processes 7 --display-config
wmp build repository playbooks