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

ci: run different jobs depending on the modified files #2696

Merged
merged 21 commits into from
Jan 9, 2022

Conversation

g1eny0ung
Copy link
Member

@g1eny0ung g1eny0ung commented Dec 22, 2021

Signed-off-by: Yue Yang g1enyy0ung@gmail.com

What problem does this PR solve?

Close #2233.

What's changed and how it works?

In addition to what the title says, this PR adds UI tests in GitHub Actions and also removes some tests because we decided to use an OpenAPI converter to generate HTTP APIs.

Related changes

  • Need to update chaos-mesh/website
  • Need to update Dashboard UI
  • Need to cheery-pick to release branches
    • release-2.1
    • release-2.0

Checklist

Tests

  • Unit test
  • E2E test
  • No code
  • Manual test (add steps below)

Side effects

  • Breaking backward compatibility

Release note

Please add a release note.

You can safely ignore this section if you don't think this PR needs a release note.

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 22, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • STRRL
  • iguoyr

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@codecov
Copy link

codecov bot commented Dec 22, 2021

Codecov Report

Merging #2696 (a9704d9) into master (6efcf8a) will decrease coverage by 0.26%.
The diff coverage is n/a.

❗ Current head a9704d9 differs from pull request most recent head c7a66ed. Consider uploading reports for the commit c7a66ed to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2696      +/-   ##
==========================================
- Coverage   41.07%   40.80%   -0.27%     
==========================================
  Files         144      143       -1     
  Lines       11719    11660      -59     
==========================================
- Hits         4813     4758      -55     
+ Misses       6542     6540       -2     
+ Partials      364      362       -2     
Impacted Files Coverage Δ
.../workflow/controllers/workflow_entry_reconciler.go 46.03% <0.00%> (-6.88%) ⬇️
pkg/bpm/bpm.go 39.50% <0.00%> (ø)
pkg/label/label.go 100.00% <0.00%> (ø)
pkg/chaosdaemon/httpchaos_server.go 0.00% <0.00%> (ø)
controllers/action/multiplexer.go
pkg/selector/generic/mode.go 28.20% <0.00%> (+2.56%) ⬆️
pkg/workflow/controllers/deadline_reconciler.go 69.62% <0.00%> (+5.18%) ⬆️

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 762dc73...c7a66ed. Read the comment docs.

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@g1eny0ung g1eny0ung changed the title ci: add ui related tests ci: run different jobs depending on the modified files Dec 22, 2021
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@g1eny0ung
Copy link
Member Author

g1eny0ung commented Dec 22, 2021

/cc @chaos-mesh/maintainers @chaos-mesh/committers

Here are the more detailed updates:

  • The following workflows remove the on push event in the master branch (since we have already checked it at pull request):

    • checklink.yaml
    • integration_test.yml
    • license_checker.yml
    • script_test.yml
  • For a long time, we have always run several required checks before merging a PR into the master, and if we want to run different jobs depending on modified files, it's needed to skip unmatched jobs. But GitHub Action can't do this at the job level. So in ci.yml, I use dorny/paths-filter@v2 to do this:

@ti-chi-bot ti-chi-bot requested review from a team December 22, 2021 15:53
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@STRRL STRRL self-requested a review December 27, 2021 06:57
@STRRL
Copy link
Member

STRRL commented Dec 27, 2021

sorry, I just want to click "Comment", not "Approve". Please take a look on the comments @g1eny0ung

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
@g1eny0ung
Copy link
Member Author

sorry, I just want to click "Comment", not "Approve". Please take a look on the comments @g1eny0ung

Got it! I'm have already fixed them.

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Copy link
Member

@iguoyr iguoyr left a comment

Choose a reason for hiding this comment

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

LGTM

@iguoyr
Copy link
Member

iguoyr commented Jan 7, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 57aad34

@g1eny0ung
Copy link
Member Author

/run-all-tests

@g1eny0ung
Copy link
Member Author

/merge

@g1eny0ung g1eny0ung merged commit 13590d3 into chaos-mesh:master Jan 9, 2022
@g1eny0ung g1eny0ung deleted the ci/ui branch January 9, 2022 12:11
@ti-srebot
Copy link
Contributor

cherry pick to release-2.1 failed

g1eny0ung added a commit to g1eny0ung/chaos-mesh that referenced this pull request Jan 10, 2022
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
craig-seeman pushed a commit to craig-seeman/chaos-mesh that referenced this pull request Jan 10, 2022
* ci: add ui related tests

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: ci

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix(ci): cache-dependency-path

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix(ci): order of steps

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: remove unused

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: sync ci workflow

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: ci

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* ci: merge jobs by dorny/paths-filter@v2

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: typo

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: cache key

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: remove verify in ci/ui

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: re-add push event in codecov

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: makefile to Makefile

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: supplement to the previous commit

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Craig Seeman <cseeman@zendesk.com>
ti-chi-bot pushed a commit that referenced this pull request Jan 11, 2022
* chore: sync #2696 and #2758

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: print filter outputs

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: needs name

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: remove duplicate steps

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: run different CI depending on the modified files
5 participants