Skip to content

chore: trigger ecosystem-ci by comment#9887

Merged
patak-cat merged 2 commits intovitejs:mainfrom
sapphi-red:chore/trigger-ecosystem-ci-from-comment
Aug 31, 2022
Merged

chore: trigger ecosystem-ci by comment#9887
patak-cat merged 2 commits intovitejs:mainfrom
sapphi-red:chore/trigger-ecosystem-ci-from-comment

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red commented Aug 28, 2022

Description

Make it possible to run ecosystem-ci by commenting /ecosystem-ci run to PR.

Example: sapphi-red#2
(the CI ran failed because I commented out Line 37 which requires vitejs/vite-ecosystem-ci#120)

requires vitejs/vite-ecosystem-ci#122

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Aug 28, 2022
Comment thread .github/workflows/ecosystem-ci-trigger.yml Outdated
Comment thread .github/workflows/ecosystem-ci-trigger.yml Outdated
Comment thread .github/workflows/ecosystem-ci-trigger.yml
@sapphi-red sapphi-red force-pushed the chore/trigger-ecosystem-ci-from-comment branch from dc340c8 to faf7d4b Compare August 31, 2022 08:52
@sapphi-red
Copy link
Copy Markdown
Member Author

sapphi-red commented Aug 31, 2022

@patak-dev @dominikg
I've implemented these features:

  • allow user list
  • show result after run & disable discord webhook
  • /ecosystem-ci {suite}

and also changed to use GitHub App instead of PAT

Example: sapphi-red#3

@sapphi-red
Copy link
Copy Markdown
Member Author

sapphi-red commented Aug 31, 2022

The current flow:

sequenceDiagram
  actor U as user
  participant vPR as vitejs/vite<br>PR
  actor vGA as vitejs/vite<br>GitHub Actions
  actor eGA as vitejs/vite-ecosystem-ci<br>GitHub Actions

  U ->> vPR: comment on PR
  vPR ->> vGA: trigger
  vGA ->> vPR: add :+1: reaction to comment
  Note over vPR,vGA: when triggered user is not allowed, add :-1: reaction to comment and end
  vGA ->> eGA: trigger "ecosystem-ci-from-pr"
  eGA ->> vPR: add comment
  eGA ->> eGA: run ecosystem-ci
  eGA ->> vPR: add result to comment

  vPR ->> U: gets result
Loading

To setup GitHub App, the following steps are required:

  1. Create GitHub App
  2. Grant permissions
    • Actions: Read and Write
    • Issues: Read and Write
    • Pull requests: Read and Write
  3. Install GitHub App
    • vitejs/vite
    • vitejs/vite-ecosystem-ci
  4. Generate private key
  5. Set secrets for vitejs/vite and vitejs/vite-ecosystem-ci

@patak-cat
Copy link
Copy Markdown
Member

Amazing work @sapphi-red 😍, and thanks again for the detailed explanations.
I think we should move forward to test the flows, and we can keep iterating later! This is too good!

@sapphi-red sapphi-red marked this pull request as ready for review August 31, 2022 10:52
@patak-cat patak-cat merged commit 7c4ab51 into vitejs:main Aug 31, 2022
@sapphi-red
Copy link
Copy Markdown
Member Author

@patak-dev I don't have permission to create GitHub Apps under the vitejs org and set secrets to vitejs/vite and vitejs/vite-ecosystem-ci.
Would you setup these?

@patak-cat
Copy link
Copy Markdown
Member

@sapphi-red all done 🙌🏼

@sapphi-red
Copy link
Copy Markdown
Member Author

@patak-dev Thanks!

@sapphi-red
Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@patak-cat
Copy link
Copy Markdown
Member

I love the 👍🏼 reaction on your comment ❤️

@sapphi-red
Copy link
Copy Markdown
Member Author

It failed.
https://github.com/vitejs/vite/runs/8112624941?check_suite_focus=true#step:4:7

Maybe these values are different?🤔
It seems the values are empty or not a expected value. (Note that I changed secret names for each repository to make it easier to know what it is)

app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }}
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }}

@sapphi-red
Copy link
Copy Markdown
Member Author

/ecosystem-ci run

1 similar comment
@sapphi-red
Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@vite-ecosystem-ci
Copy link
Copy Markdown

vite-ecosystem-ci Bot commented Aug 31, 2022

📝 Ran ecosystem CI: Open

suite result
astro ✅ success
iles ✅ success
ladle ✅ success
laravel ✅ success
marko ✅ success
nuxt-framework ✅ success
rakkas ✅ success
storybook ❌ failure
svelte ✅ success
vite-plugin-ssr ✅ success
vite-setup-catalogue ✅ success
vitepress ✅ success
vitest ✅ success
windicss ✅ success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1-chore Doesn't change code behavior (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants