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

CircleCI to Github actions migration for Kedro-Viz (test) #1846

Merged
merged 24 commits into from
Apr 22, 2024
Merged

Conversation

jitu5
Copy link
Contributor

@jitu5 jitu5 commented Apr 5, 2024

Description

Resolves #1785

Development notes

The migration from CircleCI to Github Actions will be have to done in parts. This PR addresses the following parts -

Reusable Workflows:

  • lint.yml:

    • Triggered by another workflow call : all-checks.yml & build-backend.yml
    • Inputs: os & python-version
    • Checks out code, installs dependencies and runs linter.
  • e2e-tests.yml:

    • Triggered by another workflow call : all-checks.yml & build-backend.yml
    • Inputs: os, python-version, branch
    • Checks out code, installs dependencies and runs end to end tests.
  • unit-tests.yml:

    • Triggered by another workflow call : all-checks.yml & build-backend.yml
    • Inputs: os, python-version, branch
    • Checks out code, installs dependencies and runs unit-tests.
  • javascript-lint-and-tests.yml:

    • Triggered by:
      • Call by another workflow : all-checks.yml
      • PRs on any branch, excluding those with changes to files in the package/** paths.
      • Pushes on any branch, excluding those with changes to files in the package/** paths.
    • Checks out code, installs dependencies and javascript linter & tests.
  • all-checks.yml:

    • Triggered by calls from another workflow : check-release.yml (will be added in separate PR)
    • Run every day at 1:00 AM(UTC time)
    • Calls - unit-test.yml, lint.yml, e2e-tests.yml and javascript-lint-and-tests.yml as separate jobs.

Reusable Actions:

  • install_node_dependencies/action.yml:

    • Triggered by calls from workflow : e2e-tests.yml, unit-tests.yml, javascript-lint-and-tests.yml and release.yml (will be added in separate PR)
    • Sets up a specific Node.js version, caches Node modules, and installs Node dependencies.
  • install_python_dependencies/action.yml:

    • Triggered by calls from workflow : e2e-tests.yml, unit-tests.yml, javascript-lint-and-tests.yml and lint.yml
    • Installs Kedro from the main branch and other Python dependencies, then prints the Python version and installed packages.
  • setup_tests/action.yml:

    • Triggered by calls from workflow : e2e-tests.yml and unit-tests.yml.
    • Sets up the testing environment by setting up Python and Node.js, caching Python packages, installing Kedro and other Python dependencies, and building the React application.

Workflows:

  • build-backend.yml:

    • Triggered by:
      • PRs on any branch with files having package/** & .github/** paths
      • Push on any branch with files having package/** & .github/** paths
    • Calls - unit-test.yml, lint.yml and e2e-tests.yml as separate jobs.
Screenshot 2024-04-11 at 1 56 54 p m

Miro board link

The following will be added in separate PRs

  • Check Release (Workflow)
  • Release (Workflow)
  • Deploy Demo (Workflow)

Notes

  • The lint test is only run on Python 3.9 - This is what we had on CircleCI.
  • I've added cypress/fixtures/graphql/ to trufflehog-ignore.txt because secret-scan was complaining some files under it.
  • unit-tests.yml & e2e-tests.yml run on main and demo branches for Windows and all branch for ubuntu, This is what we had on CircleCI.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

@jitu5 jitu5 self-assigned this Apr 5, 2024
@jitu5 jitu5 changed the title CircleCI to Github actions migration for test CircleCI to Github actions migration for Kedro-Viz (test) Apr 5, 2024
Copy link
Contributor

@SajidAlamQB SajidAlamQB left a comment

Choose a reason for hiding this comment

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

Hey Jitendra, just had a look over the draft it looks great I've just left some minor comments. Happy to approve once its out of draft otherwise.

.github/workflows/all-checks.yml Show resolved Hide resolved
.github/workflows/all-checks.yml Outdated Show resolved Hide resolved
@jitu5 jitu5 marked this pull request as ready for review April 9, 2024 13:22
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

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

I think you can combine build-frontend.yml and javascript-lint-and-tests.yml into one if build-frontend.yml is just calling javascript-lint-and-tests.yml. Otherwise everything looks good!

Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

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

LGTM! Great work @jitu5 💯

Copy link
Contributor

@SajidAlamQB SajidAlamQB left a comment

Choose a reason for hiding this comment

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

Thank you @jitu5, this looks great!

jitu5 and others added 4 commits April 15, 2024 09:18
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
jitu5 and others added 3 commits April 16, 2024 16:36
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Copy link
Contributor

@ravi-kumar-pilla ravi-kumar-pilla left a comment

Choose a reason for hiding this comment

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

Awesome work @jitu5 !! Excited to have gh-actions 🥇 💯

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

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

Amazing LGTM!! feel free to merge once tests pass. thanks @jitu5

@jitu5 jitu5 merged commit 65acdf9 into main Apr 22, 2024
23 checks passed
@jitu5 jitu5 deleted the feature/gha-test branch April 22, 2024 11:08
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.

Migrate Kedro-Viz from CircleCI to GitHub Actions
5 participants