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

[core] Ignore unrelated folders from github actions #35028

Merged
merged 4 commits into from Nov 9, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Nov 7, 2022

Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-paths.

The ci.yml github action is all about packages check which is not related to docs and examples folders. This PR will speed up the CI check.

How to test?

I think we have to merge this one and open a fake PR that contains changes in docs/examples to test if the ignore works.


@siriwatknp siriwatknp added the core Infrastructure work going on behind the scenes label Nov 7, 2022
@siriwatknp siriwatknp requested a review from a team November 7, 2022 05:38
@mui-bot
Copy link

mui-bot commented Nov 7, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35028--material-ui.netlify.app/

No bundle size changes

Generated by 🚫 dangerJS against cb8901d

@michaldudak
Copy link
Member

I think this could cause a problem because CI / test-dev is a required check and, according to GitHub docs, when skipped, it'll stay in a Pending state forever (see the note under https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths).

There is a workaround described in https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

@siriwatknp
Copy link
Member Author

I think this could cause a problem because CI / test-dev is a required check and, according to GitHub docs, when skipped, it'll stay in a Pending state forever (see the note under https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths).

There is a workaround described in https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

Oh, nice. Forgot about the check.

@siriwatknp
Copy link
Member Author

@michaldudak please review again.

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

This should do the trick. Let's test it in action.

@siriwatknp siriwatknp merged commit 5ce57e9 into mui:master Nov 9, 2022
@siriwatknp
Copy link
Member Author

🎉 It works! #35062
image

@michaldudak
Copy link
Member

michaldudak commented Nov 11, 2022

@siriwatknp There's a problem with running checks in PRs that change just the docs. See #35076
I think the source of the issue is the name of the job - it should be named the same as the required check (test-dev in this case).
However, I wonder if specifying it for:

pull_request:
    paths:
      - 'docs/**'
      - 'examples/**'

won't trigger the "fake" action also for PRs that change both the docs and other code. We'll have two jobs with the same name running - I don't know if this can cause any problems.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 11, 2022

@siriwatknp what do you think about moving these tests to CircleCI? The value could be about having a single tool to run the CI. This means a single place to gather analytics about it, a single learning curve, or billing. For example, we could allocate larger machines.

Regarding only running based on the file changed, we could copy

if [ $FOLDER_COMMIT = $LATEST_COMMIT ]; then
echo "changes, let's run the tests"

@siriwatknp
Copy link
Member Author

@siriwatknp what do you think about moving these tests to CircleCI? The value could be about having a single tool to run the CI. This means a single place to gather analytics about it, a single learning curve, or billing. For example, we could allocate larger machines.

Regarding only running based on the file changed, we could copy

if [ $FOLDER_COMMIT = $LATEST_COMMIT ]; then
echo "changes, let's run the tests"

Hey, I think that's another topic. My first intention is to skip the tests for non-related changes, not moving them to another provider.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 15, 2022

@siriwatknp My thought was that the day-to-day problem is that this CI task is the slowest. On CircleCI, we could give the environment that runs these scripts more CPUs, the task would no longer be the slowest one. Skipping unnecessary work sounds great too 👍

the-mgi pushed a commit to the-mgi/material-ui that referenced this pull request Nov 17, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
feliperli pushed a commit to jesrodri/material-ui that referenced this pull request Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants