name: Build and validate generated code on: workflow_dispatch: push: branches: [ main ] pull_request: branches: [ main, dev ] workflow_call: jobs: validate: name: Validate code accuracy runs-on: ubuntu-latest strategy: max-parallel: 5 matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] 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 -r requirements-dev.txt - name: Lint with Pylint run: pylint msgraph --disable=W --rcfile=.pylintrc # The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure. # Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks. check-build-matrix: runs-on: ubuntu-latest needs: validate if: always() steps: - name: All build matrix options are successful if: ${{ !(contains(needs.*.result, 'failure')) }} run: exit 0 - name: One or more build matrix options failed if: ${{ contains(needs.*.result, 'failure') }} run: exit 1