-
Notifications
You must be signed in to change notification settings - Fork 1.1k
71 lines (61 loc) · 2.28 KB
/
Copy pathbuild-pull-request.yml
File metadata and controls
71 lines (61 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build pull request
on:
pull_request:
types:
- opened
- synchronize
- reopened
# called from rebuild-pull-request-on-label.yml
workflow_call:
concurrency:
# fixed group name (not github.workflow) so that runs triggered by pull_request
# and runs triggered via workflow_call from rebuild-pull-request-on-label.yml
# share the group, otherwise the PR build would run twice in parallel whenever
# a "test *" label is added
group: build-pull-request-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
common:
uses: ./.github/workflows/build-common.yml
with:
# it's rare for only the openj9 tests, openj9 smoke variants, or the windows smoke tests to break
skip-openj9-tests: ${{ !contains(github.event.pull_request.labels.*.name, 'test openj9') }}
skip-windows-smoke-tests: ${{ !contains(github.event.pull_request.labels.*.name, 'test windows') }}
cache-read-only: true
test-latest-deps:
uses: ./.github/workflows/reusable-test-latest-deps.yml
with:
cache-read-only: true
test-native:
uses: ./.github/workflows/reusable-native-tests.yml
with:
skip-native-tests: ${{ !contains(github.event.pull_request.labels.*.name, 'test native') }}
muzzle:
uses: ./.github/workflows/reusable-muzzle.yml
with:
cache-read-only: true
# this is not a required check to avoid blocking pull requests if external links break
markdown-check:
# release branches are excluded because the README.md javaagent download link has to be updated
# on release branches before the release download has been published
if: "!startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/')"
uses: ./.github/workflows/reusable-link-check.yml
markdown-lint-check:
uses: ./.github/workflows/reusable-markdown-lint-check.yml
required-status-check:
needs:
- common
- test-latest-deps
- muzzle
- markdown-lint-check
runs-on: ubuntu-latest
if: always()
steps:
- if: |
needs.common.result != 'success' ||
needs.test-latest-deps.result != 'success' ||
needs.muzzle.result != 'success' ||
needs.markdown-lint-check.result != 'success'
run: exit 1 # fail