From b7bbd7b49701f9c587a38589a4d2d35cb3136698 Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 20 Nov 2022 21:23:05 +0800 Subject: [PATCH] ci: configure bors --- .github/bors.toml | 7 +++++++ .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/bors.toml diff --git a/.github/bors.toml b/.github/bors.toml new file mode 100644 index 00000000000..dfe28aba8d9 --- /dev/null +++ b/.github/bors.toml @@ -0,0 +1,7 @@ +delete_merged_branches = true +required_approvals = 0 +use_codeowners = false +status = [ + "conclusion", +] +timeout_sec = 21600 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93c9002349e..534447e77c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,10 @@ on: push: branches: - main + # for bors r+ + - staging + # for bors try + - trying pull_request: workflow_dispatch: @@ -43,6 +47,7 @@ jobs: check-target: needs: [fmt] runs-on: ubuntu-latest + if: github.event_name != 'pull_request' strategy: # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }} @@ -313,6 +318,7 @@ jobs: CARGO_PRIMARY_PACKAGE: 1 valgrind: + if: github.event_name != 'pull_request' needs: [fmt] runs-on: ubuntu-latest steps: @@ -336,6 +342,7 @@ jobs: TRYBUILD: overwrite careful: + if: github.event_name != 'pull_request' needs: [fmt] runs-on: ubuntu-latest steps: @@ -387,6 +394,7 @@ jobs: emscripten: name: emscripten + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -416,3 +424,24 @@ jobs: run: nox -s build-emscripten - name: Test run: nox -s test-emscripten + + conclusion: + needs: + - fmt + - clippy + - check-target + - build + - valgrind + - careful + - coverage + - emscripten + if: always() + runs-on: ubuntu-latest + steps: + - name: Result + run: | + jq -C <<< "${needs}" + # Check if all needs were successful or skipped. + "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")" + env: + needs: ${{ toJson(needs) }}