Skip to content

Commit fe3da1b

Browse files
authored
ci: report test status to changes made from a forked branch (#36)
1 parent f23058b commit fe3da1b

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/MAINTAINERS_GUIDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,10 @@ Steps to merge a pull request:
750750
1. Tests must pass on the pull request using the continuous integration suite
751751
- Tests for development APIs are optional, but we recommend investigating why
752752
it's failing before merging
753+
- End-to-end tests for pull requests from forks can be [started][e2e] if:
754+
- The `workflow` from the **main** branch is used
755+
- The `branch` contains the pull request number as: `pull/123/head`
756+
- The `status` is reported with the commit checks
753757
2. Code is reviewed and approved by another maintainer
754758
3. Title is descriptive
755759
- This becomes part of the CHANGELOG, so please make sure it's meaningful to
@@ -770,6 +774,7 @@ When in doubt, find the other maintainers and ask.
770774
[commit]: https://www.conventionalcommits.org/en/v1.0.0/
771775
[contributing]: ./CONTRIBUTING.md
772776
[dev-release]: https://github.com/slackapi/slack-cli/releases/tag/dev-build
777+
[e2e]: https://github.com/slackapi/slack-cli/actions/workflows/e2e_tests.yml
773778
[effective-go]: https://golang.org/doc/effective_go
774779
[github-app]: https://github.com/apps/slack-cli-releaser
775780
[goinstaller]: https://go.dev/doc/install

.github/workflows/e2e_tests.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,32 @@ on:
55
workflow_dispatch:
66
inputs:
77
branch:
8-
description: 'The branch to build'
8+
description: "The branch to build"
9+
required: true
10+
status:
11+
description: "Report test status"
12+
default: false
13+
type: boolean
914
required: true
1015

1116
jobs:
1217
execute:
18+
name: Start tests
1319
runs-on: ubuntu-latest
1420
steps:
15-
- name: Trigger CircleCI build-beta workflow.
21+
- name: Trigger CircleCI 'local' workflow
22+
if: ${{ github.event.inputs.status == 'false' }}
1623
uses: promiseofcake/[email protected]
1724
with:
1825
user-token: ${{ secrets.CIRCLECI_TOKEN }}
1926
project-slug: slackapi/slack-cli
2027
branch: ${{ github.event.inputs.branch }}
2128
payload: '{"run_local_build_test_workflow": true}'
29+
- name: Trigger CircleCI 'e2e' workflow
30+
if: ${{ github.event.inputs.status == 'true' }}
31+
uses: promiseofcake/[email protected]
32+
with:
33+
user-token: ${{ secrets.CIRCLECI_TOKEN }}
34+
project-slug: slackapi/slack-cli
35+
branch: ${{ github.event.inputs.branch }}
36+
payload: '{"run_local_build_test_workflow": false}'

0 commit comments

Comments
 (0)