Skip to content

Commit 83ef5b3

Browse files
authored
Set up merge queue checks (#508)
### Motivation: We would like to have macOS CI run on each PR but suspect that runner capacity is insufficient to have this run interactively on each commit. One solution to this is to use merge queues and only run the macOS checks once the PR is approved for merging. ### Modifications: * Duplicate PR checks (minus soundness) and run them as part of checks on a merge. * Remove macOS checks in `main.yml` for now so we don't duplicate work on the merges. We might want to rethink the trigger for this on repos with merge queues to only run on a timer. ### Result: The repo is configured for use with merge queues.
1 parent 276b9cb commit 83ef5b3

File tree

2 files changed

+56
-6
lines changed

2 files changed

+56
-6
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,3 @@ jobs:
5151
with:
5252
name: "Integration tests"
5353
matrix_string: '${{ needs.construct-integration-tests-matrix.outputs.integration-tests-matrix }}'
54-
55-
macos-tests:
56-
name: macOS tests
57-
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
58-
with:
59-
build_scheme: swift-nio-http2-Package

.github/workflows/merge_group.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Merge group
2+
3+
on:
4+
merge_group:
5+
6+
jobs:
7+
unit-tests:
8+
name: Unit tests
9+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
10+
with:
11+
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
12+
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
13+
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
14+
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
15+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
16+
17+
cxx-interop:
18+
name: Cxx interop
19+
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
20+
21+
h2spec:
22+
name: HTTP/2 spec tests
23+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
24+
with:
25+
name: "HTTP/2 spec tests"
26+
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q wget lsof && mkdir $HOME/.tools && wget -q https://github.com/summerwind/h2spec/releases/download/v2.2.1/h2spec_linux_amd64.tar.gz -O $HOME/.tools/h2spec.tar.gz && tar xzf $HOME/.tools/h2spec.tar.gz --directory $HOME/.tools && PATH=${PATH}:$HOME/.tools && ./scripts/test_h2spec.sh"
27+
28+
construct-integration-tests-matrix:
29+
name: Construct Examples matrix
30+
runs-on: ubuntu-latest
31+
outputs:
32+
integration-tests-matrix: '${{ steps.generate-matrix.outputs.integration-tests-matrix }}'
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
38+
- id: generate-matrix
39+
run: echo "integration-tests-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
40+
env:
41+
MATRIX_LINUX_COMMAND: "./scripts/integration_tests.sh"
42+
MATRIX_LINUX_SETUP_COMMAND: "apt-get update -y -q && apt-get install -y -q jq"
43+
44+
integration-tests:
45+
name: Integration Tests
46+
needs: construct-integration-tests-matrix
47+
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
48+
with:
49+
name: "Integration tests"
50+
matrix_string: '${{ needs.construct-integration-tests-matrix.outputs.integration-tests-matrix }}'
51+
52+
macos-tests:
53+
name: macOS tests
54+
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
55+
with:
56+
build_scheme: swift-nio-http2-Package

0 commit comments

Comments
 (0)