Skip to content

Commit

Permalink
Merge pull request #162 from microsoft/fix/branch-policy-casing
Browse files Browse the repository at this point in the history
ci: fixes branch policy casing
  • Loading branch information
baywet authored Sep 4, 2024
2 parents 8ff26f6 + f2d8556 commit 4dd5a5b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configuration:
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- license/cla
- build
- check-php-version-matrix
# Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
requiresStrictStatusChecks: false
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
php-versions: ['7.4', '8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -56,3 +56,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

# The check-php-version-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-php-version-matrix:
runs-on: ubuntu-latest
needs: [build, code-coverage]
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

0 comments on commit 4dd5a5b

Please sign in to comment.