From ae98f5edf15374d199ad5e4f1f59abc4c8ebd3b5 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 13 Jul 2023 23:35:23 -0400 Subject: [PATCH 1/5] Delete bors.toml in favor of GitHub merge queues --- bors.toml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 bors.toml diff --git a/bors.toml b/bors.toml deleted file mode 100644 index bfa4661a1..000000000 --- a/bors.toml +++ /dev/null @@ -1,3 +0,0 @@ -status = [ - "ci result", -] From fcc1430bef3e510aad93dac2bc3af6dda16710af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Thu, 27 Jul 2023 15:44:22 +0100 Subject: [PATCH 2/5] Add merge_group setting as per docs --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82ce93df5..7d2e79684 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,7 @@ on: - trying - release/** pull_request: + merge_group: schedule: [cron: "45 6 * * *"] name: Run tests From 4bff7e1cd5749244d0317366922c8f71939c6a0d Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 21 Aug 2023 15:37:33 -0700 Subject: [PATCH 3/5] Update workflow to work with GH merge queue We need a ci-status job that explicitly fails, rather than skips. As we discovered in https://github.com/georust/proj/pull/179, the previous configuration would skip the aggregate "ci status" job if any of it's `needs` failed, which would result in the merge queue proceeding with the merge. --- .github/workflows/test.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d2e79684..f560b36e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,11 @@ on: name: Run tests jobs: # The `ci-result` job doesn't actually test anything - it just aggregates the - # overall build status for bors, otherwise our bors.toml would need an entry + # overall build status, otherwise the merge queue would need an entry # for each individual job produced by the job-matrix. # - # Ref: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 - # - # ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF THIS JOB! - ci-result: + # ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF both "ci result" JOBS! + ci-success: name: ci result runs-on: ubuntu-latest needs: @@ -28,12 +26,23 @@ jobs: - geo_postgis - geo_fuzz - bench + if: success() steps: - name: Mark the job as a success - if: success() run: exit 0 + ci-failure: + name: ci result + runs-on: ubuntu-latest + needs: + - lint + - geo_types + - geo + - geo_postgis + - geo_fuzz + - bench + if: failure() + steps: - name: Mark the job as a failure - if: "!success()" run: exit 1 lint: From f593faedd0b35e4742146834811431045b097e9b Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 21 Aug 2023 15:44:46 -0700 Subject: [PATCH 4/5] Add a failing test to ensure merge queues are working as expected --- geo/src/algorithm/area.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/geo/src/algorithm/area.rs b/geo/src/algorithm/area.rs index 744112f13..f14cd57c2 100644 --- a/geo/src/algorithm/area.rs +++ b/geo/src/algorithm/area.rs @@ -532,4 +532,9 @@ mod test { max_relative = 0.0001 ); } + + #[test] + fn failing_test() { + panic!("This intentionally panics to test that CI won't allow it to be merged"); + } } From b065119781523c5faec9b2ae91fc05673585ba36 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 21 Aug 2023 16:08:07 -0700 Subject: [PATCH 5/5] Revert "Add a failing test to ensure merge queues are working as expected" This reverts commit f593faedd0b35e4742146834811431045b097e9b. --- geo/src/algorithm/area.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/geo/src/algorithm/area.rs b/geo/src/algorithm/area.rs index f14cd57c2..744112f13 100644 --- a/geo/src/algorithm/area.rs +++ b/geo/src/algorithm/area.rs @@ -532,9 +532,4 @@ mod test { max_relative = 0.0001 ); } - - #[test] - fn failing_test() { - panic!("This intentionally panics to test that CI won't allow it to be merged"); - } }