-
Notifications
You must be signed in to change notification settings - Fork 857
90 lines (78 loc) · 2.94 KB
/
build-pull-request.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build pull request
on:
pull_request:
types:
- labeled
- opened
- synchronize
- reopened
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
common:
uses: ./.github/workflows/build-common.yml
with:
# it's rare for only the openj9 tests 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-indy:
uses: ./.github/workflows/reusable-test-indy.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
shell-script-check:
uses: ./.github/workflows/reusable-shell-script-check.yml
# this is not a required check to avoid blocking pull requests if external links break
markdown-link-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-markdown-link-check.yml
markdown-lint-check:
uses: ./.github/workflows/reusable-markdown-lint-check.yml
misspell-check:
uses: ./.github/workflows/reusable-misspell-check.yml
required-status-check:
# test-latest-deps is not included in the required status checks
# 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
# (muzzle can also fail when a new library version is released to maven central
# but that happens much less often)
#
# only the "common" checks are required for release branch PRs in order to avoid any unnecessary
# release branch maintenance (especially for patches)
needs:
- common
- muzzle
- shell-script-check
- markdown-lint-check
- misspell-check
runs-on: ubuntu-latest
if: always()
steps:
- if: |
needs.common.result != 'success' ||
(
!startsWith(github.base_ref, 'release/') &&
(
needs.muzzle.result != 'success' ||
needs.shell-script-check.result != 'success' ||
needs.markdown-lint-check.result != 'success' ||
needs.misspell-check.result != 'success'
)
)
run: exit 1 # fail