Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: run CI on PRs from forks #399

Merged
merged 3 commits into from Sep 22, 2021
Merged

chore: run CI on PRs from forks #399

merged 3 commits into from Sep 22, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 15, 2021

Purpose (TL;DR) - mandatory

CI is not running - see #398

@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #399 (df5c157) into master (aaa8153) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #399   +/-   ##
=======================================
  Coverage   93.85%   93.85%           
=======================================
  Files           1        1           
  Lines         586      586           
=======================================
  Hits          550      550           
  Misses         36       36           
Flag Coverage Δ
unit 93.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaa8153...df5c157. Read the comment docs.

on:
push:
branches:
- master
Copy link
Member Author

@SimenB SimenB Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limiting to only run on pushes to master to avoid duplicate runs when opening a PR from a branch in this repo (like this very PR):
image

@SimenB SimenB changed the title chore: run CI on PRs chore: run CI on PRs from forks Sep 15, 2021
@fatso83
Copy link
Contributor

fatso83 commented Sep 15, 2021

Weird. We always used to run on pull requests. When did we stop doing that, @mroderick?

I don't claim to remember the specifics, but AFAIK we decided not to run the saucelabs tests on prs to avoid the risk of the credentials being exposed. Someone could do console.log(process.env.SAUCELABS_SECRET) for instance.
Does this change any of that?

P.S. Didn't get the reference to 398.

@SimenB
Copy link
Member Author

SimenB commented Sep 15, 2021

P.S. Didn't get the reference to 398.

No CI runs there since it's from a fork

@benjamingr
Copy link
Member

I don't claim to remember the specifics, but AFAIK we decided not to run the saucelabs tests on prs to avoid the risk of the credentials being exposed. Someone could do console.log(process.env.SAUCELABS_SECRET) for instance.
Does this change any of that?

Yeah I agree running CI on forks is a bit dangerous - I think PRs whose author has the commit bit or PRs with a specific GitHub label (since only project members can add those) might be a good tradeoff?

@SimenB
Copy link
Member Author

SimenB commented Sep 22, 2021

Note that GH by default doesn't run CI for people who are first time contributors (https://github.blog/changelog/2021-04-22-github-actions-maintainers-must-approve-first-time-contributor-workflow-runs/) if that helps.

The current situation is not really tenable as it places the burden of testing everything CI does on the person merging a PR

@fatso83
Copy link
Contributor

fatso83 commented Sep 22, 2021

OK, if that is the case, then I think this should merge. I think we should do the same with Sinon TBH. Should some pre-approved committer then expose those credentials, it is always possible to create a new token.

@fatso83
Copy link
Contributor

fatso83 commented Sep 22, 2021

cc @mroderick @mantoni

@fatso83 fatso83 merged commit f434b69 into master Sep 22, 2021
@fatso83 fatso83 deleted the SimenB-patch-1 branch September 22, 2021 08:35
@SimenB
Copy link
Member Author

SimenB commented Sep 22, 2021

Oh, and ref people logging out the secret

https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow

Note: With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

@benjamingr
Copy link
Member

@SimenB the thing is - either browser tests run or don't run on CI.

  • If they don't run we haven't actually solved much (running just Node tests is better than nothing but wouldn't catch Safari bugs).
  • If they do run then people can log the secret.

Worst case like Carl said - the secret leaks and we'll replace the token - it's just a saucelabs account not the npm publish token :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants