-
Notifications
You must be signed in to change notification settings - Fork 1.6k
132 lines (117 loc) · 3.84 KB
/
master_merge_queue.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Master Merge Queue Test Suite
#
# This workflow orchestrates a collection of workflows that are required for the merge queue check.
#
# Most of the workflows that are jobs within this one, are able to be run on demand
# by issuing a PR comment with the respective command to trigger said workflow.
#
# The design of this workflow relies on the first real job "changes" to detect file
# changes against the base, and each downstream workflow after that will only be
# called if the files for that area have changed.
#
name: Master Merge Queue Test Suite
on:
# Only want to run this on merge queue, but because GH doesn't allow specifying different required checks
# for pull request and merge queue, we need to "run" it in pull request, but in the jobs we will just auto pass.
pull_request:
merge_group:
types: [checks_requested]
permissions:
statuses: write
concurrency:
# `github.ref` is unique for MQ runs and PRs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AWS_ACCESS_KEY_ID: "dummy"
AWS_SECRET_ACCESS_KEY: "dummy"
CONTAINER_TOOL: "docker"
DD_ENV: "ci"
DD_API_KEY: ${{ secrets.DD_API_KEY }}
RUST_BACKTRACE: full
TEST_LOG: vector=debug
VERBOSE: true
CI: true
PROFILE: debug
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
# can be removed when we switch back to the upstream openssl-sys crate
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
# This is the entry job which is required for all the actual tests in this workflow.
# If we don't run this job (such as in a pull request), then by consequence all downstream
# test jobs are not run. This allows us to not have to check for merge group in each job.
changes:
if: ${{ github.event_name == 'merge_group' }}
uses: ./.github/workflows/changes.yml
with:
base_ref: ${{ github.event.merge_group.base_ref }}
head_ref: ${{ github.event.merge_group.head_ref }}
secrets: inherit
test-cli:
if: needs.changes.outputs.source == 'true'
uses: ./.github/workflows/cli.yml
needs: changes
secrets: inherit
test-misc:
if: needs.changes.outputs.source == 'true'
uses: ./.github/workflows/misc.yml
needs: changes
secrets: inherit
test-environment:
uses: ./.github/workflows/environment.yml
needs: changes
secrets: inherit
check-msrv:
if: needs.changes.outputs.source == 'true'
uses: ./.github/workflows/msrv.yml
needs: changes
secrets: inherit
cross-linux:
# We run cross checks when dependencies change to ensure they still build.
# This helps us avoid adopting dependencies that aren't compatible with other architectures.
if: needs.changes.outputs.dependencies == 'true'
uses: ./.github/workflows/cross.yml
needs: changes
secrets: inherit
unit-mac:
if: needs.changes.outputs.source == 'true'
uses: ./.github/workflows/unit_mac.yml
needs: changes
secrets: inherit
unit-windows:
if: needs.changes.outputs.source == 'true'
uses: ./.github/workflows/unit_windows.yml
needs: changes
secrets: inherit
install-sh:
if: needs.changes.outputs.install == 'true'
uses: ./.github/workflows/install-sh.yml
needs: changes
secrets: inherit
master-merge-queue-check:
name: Master Merge Queue Suite
# Always run this so that pull_request triggers are marked as success.
if: always()
runs-on: ubuntu-20.04
timeout-minutes: 5
needs:
- changes
- test-cli
- test-misc
- test-environment
- check-msrv
- cross-linux
- unit-mac
- unit-windows
- install-sh
env:
FAILED: ${{ contains(needs.*.result, 'failure') }}
steps:
- name: exit
run: |
echo "failed=${{ env.FAILED }}"
if [[ "$FAILED" == "true" ]] ; then
exit 1
else
exit 0
fi