1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- name: PR
- on: pull_request
- concurrency:
- group: ci-${{ github.event.pull_request.number }}
- cancel-in-progress: true
- jobs:
- build:
- uses: ./.github/workflows/reusable-build.yml
- with:
- cache-read-only: true
- test:
- uses: ./.github/workflows/reusable-test.yml
- with:
- cache-read-only: true
- testLatestDeps:
- # testLatestDeps is not included in the PR workflow by default
- # because any time a new library version is released to maven central
- # it can fail due to test code incompatibility with the new library version,
- # or due to slight changes in emitted telemetry, which can be confusing for contributors
- # (muzzle can also fail when a new library version is released to maven central
- # but that happens much less often)
- #
- # the condition is on the steps below instead of here on the job, because skipping the job
- # causes the job to show up as canceled in the GitHub UI which prevents the build section from
- # collapsing when everything (else) is green
- #
- # and the name is updated when the steps below are skipped which makes what's happening clearer
- # in the GitHub UI
- uses: ./.github/workflows/reusable-test-latest-deps.yml
- with:
- skip: ${{ !contains(github.event.pull_request.labels.*.name, 'test latest deps') }}
- cache-read-only: true
- smoke-test:
- uses: ./.github/workflows/reusable-smoke-test.yml
- with:
- # windows smoke tests are slower, and it's rare for only the windows smoke tests to break
- skip-windows: true
- cache-read-only: true
- muzzle:
- # release branch PRs are excluded
- # because any time a new library version is released to maven central it can fail
- # which requires unnecessary release branch maintenance, especially for patches
- if: ${{ !startsWith(github.base_ref, 'v') }}
- uses: ./.github/workflows/reusable-muzzle.yml
- with:
- cache-read-only: true
- examples:
- uses: ./.github/workflows/reusable-examples.yml
- with:
- cache-read-only: true
- # markdown-link-check is not included in the PR build because links to external urls can break at
- # any time, which can be confusing for contributors
- markdown-misspell-check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Check markdown for common misspellings
- run: |
- curl -L -o ./install-misspell.sh https://git.io/misspell
- sh ./install-misspell.sh
- ./bin/misspell -error ./**/*
- accept-pr:
- needs: [ build, test, smoke-test, muzzle, examples, markdown-misspell-check ]
- runs-on: ubuntu-latest
- if: always()
- steps:
- - if: |
- needs.build.result != 'success' ||
- needs.test.result != 'success' ||
- needs.smoke-test.result != 'success' ||
- needs.muzzle.result != 'success' ||
- needs.examples.result != 'success' ||
- needs.markdown-misspell-check.result != 'success'
- run: exit 1
|