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

Migration from CircleCI to GitHub Actions #28572

Open
16 of 64 tasks
hjetpoluru opened this issue Nov 20, 2024 · 3 comments · May be fixed by #29256
Open
16 of 64 tasks

Migration from CircleCI to GitHub Actions #28572

hjetpoluru opened this issue Nov 20, 2024 · 3 comments · May be fixed by #29256

Comments

@hjetpoluru
Copy link
Contributor

hjetpoluru commented Nov 20, 2024

What is this about?

This ticket covers the effort required to migrate our continuous integration and deployment processes from CircleCI to GitHub Actions. The migration will involve:

  • Evaluate the current CircleCI workflows and identify the equivalent configurations in GitHub Actions.
  • Create and configure GitHub Actions workflows to replicate the existing CircleCI pipelines.
  • Thoroughly test the new GitHub Actions workflows to ensure they function as expected and meet our CI/CD requirements.
  • Gradually phase out CircleCI once the GitHub Actions workflows are fully operational and stable.

Scenario

Dependency Checks

  • test-deps-audit
  • test-deps-depcheck
  • test-yarn-dedupe

Linting

  • test-lint-shellcheck
  • test-lint-changelog
  • test-lint-lockfile
  • test-lint

Lava Moat

  • validate-lavamoat-allow-scripts
  • validate-lavamoat-policy-build
  • validate-lavamoat-policy-webapp-beta
  • validate-lavamoat-policy-webapp-flask
  • validate-lavamoat-policy-webapp-main
  • validate-lavamoat-policy-webapp-mmi

Beta Build

  • trigger-beta-build
    • validate-source-maps-beta

Storybook

  • prep-build-storybook
  • job-publish-storybook
  • test-storybook

TypeScript Migration Dashboard

  • prep-build-ts-migration-dashboard
    • job-publish-ts-migration-dashboard

Testing

  • get-changed-files-with-git-diff

Webpack

  • prep-build-test-webpack
    • test-e2e-chrome-webpack

MV2

  • prep-build-test-mv2
    • test-e2e-firefox

Flask MV2

  • prep-build-test-flask-mv2
    • test-e2e-firefox-flask

Flask

  • prep-build-test-flask
    • test-e2e-chrome-flask

General

  • prep-build-test
    • test-e2e-chrome
    • test-e2e-chrome-multiple-providers
    • test-e2e-chrome-rpc
    • stats-module-load-init
    • user-actions-benchmark
    • benchmark

MV2

  • prep-build-mv2
    • test-mozilla-lint-mv2
    • validate-source-maps-mv2

MMI

  • prep-build-mmi
    • validate-source-maps-mmi

Flask MV2

  • prep-build-flask-mv2
    • validate-source-maps-flask-mv2
    • test-e2e-chrome-rpc
    • test-mozilla-lint-flask-mv2

General Build

  • prep-build
    • test-e2e-chrome-vault-decryption
    • test-e2e-swap-playwright (OPTIONAL)
    • validate-source-maps

MMI Trigger

  • check-mmi-trigger
  • prep-build-test-mmi
    • test-e2e-chrome-mmi
    • test-e2e-chrome-rpc-mmi

MMI Playwright

  • prep-build-test-mmi-playwright
    • test-e2e-mmi-playwright

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@hjetpoluru
Copy link
Contributor Author

Evaluate the current CircleCI workflows and identify the equivalent configurations in GitHub Actions.

  • We currently have everything in the config.xml and environment variables in Circle CI settings.

@hjetpoluru
Copy link
Contributor Author

We already have the GitHub Actions workflow, need to translate the CircleCI concepts (executors, jobs, workflows, etc.) into their GitHub Actions equivalents. With help of gpt we should be able to convert this format conversion.

Note -
Cron : GitHub Actions does not support parallelism in the same way as CircleCI. You may need to split jobs manually if parallel execution is required or use the Selenium provided parallel execution.

@gauthierpetetin
Copy link
Contributor

gauthierpetetin commented Nov 26, 2024

Notes from team refinement session:

  • Github Actions also have a way parallelise as well, called "concurrency" and "matrix strategy"
  • Number of workflows to migrate:
    • 61 circle.ci workflows
    • We'd need to migrate most of them together because they all depend on each other
  • Advantages of moving to Github actions:
    • Github Actions are free on public Github repos (up to 3000 minutes/month, and with a limit of 20 concurrent jobs), while circle.ci is not (cost of circle.ci TBD)
    • People from DevRel and DevOps might be able to help us more easily
  • Consequences of moving to Github actions:
    • We'd need a new way to detect flaky tests, because that is currently done in circle.ci
    • We'll need to figure out where to store our env variables currently stored in circle.ci => Github secrets is a good place
    • We'd loose a few features from circle.ci, like tests insights, circle.ci user interface, and a few others to be identified

Next step:

  • Make a more detailed analysis of costs vs benefit of moving to Github Actions

@itsyoboieltr itsyoboieltr changed the title Migration of the CircleCI to github actions Migration from CircleCI to GitHub Actions Dec 16, 2024
@itsyoboieltr itsyoboieltr self-assigned this Dec 16, 2024
@itsyoboieltr itsyoboieltr linked a pull request Dec 16, 2024 that will close this issue
27 tasks
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate LavaMoat policy validation from CircleCI to GitHub actions. No
functional changes.

Relates to #28572
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate dependency/lockfile linting steps from CircleCI to GitHub
actions.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate lint steps from CircleCI to GitHub Actions.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2024
## **Description**

Migrate dependency/lockfile linting steps from CircleCI to GitHub
actions.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29370?quickstart=1)

## **Related issues**

Relates to #28572

These changes were extracted from #29256

## **Manual testing steps**

Review logs to ensure the same commands are run. Introduce errors on a
branch from here to ensure the problems are caught.
#29391

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate lint steps from CircleCI to GitHub Actions.

Relates to #28572

These changes were extracted from #29256
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate LavaMoat policy validation from CircleCI to GitHub actions. No
functional changes.

Relates to #28572
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2024
## **Description**

Migrate lint steps from CircleCI to GitHub Actions.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29371?quickstart=1)

## **Related issues**

Relates to #28572

These changes were extracted from #29256

## **Manual testing steps**

Branch from here, create a new draft PR, Introduce lint errors, then
ensure the jobs fail.
#29390

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate LavaMoat policy validation from CircleCI to GitHub actions. No
functional changes.

Relates to #28572
Gudahtt added a commit that referenced this issue Dec 20, 2024
Migrate the `metamaskbot` PR comment from CircleCI to GitHub Actions.
CircleCI is still used for artifact storage for linked artifacts.

Relates to #28572

These changes were extracted from #29256
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2024
## **Description**

Migrate LavaMoat policy validation from CircleCI to GitHub actions. No
functional changes.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29369?quickstart=1)

## **Related issues**

Relates to #28572

These changes were extracted from #29256

## **Manual testing steps**

* Checkout this branch (`migrate-lavamoat-validation`), then from there
create a new branch to test with
* On this new branch, make a dependency change with a policy impact
(e.g. add or remove a package, upgrade something, etc.), but make sure
the build still passes (validation requires a passing build)
* Create a draft PR, and verify that the policy validation fails
* Use the `metamaskbot update-policies` bot command to update the
policies, then verify the validation now succeeds.
PR with errors -
#29396
Failure -
https://github.com/MetaMask/metamask-extension/actions/runs/12434996100/job/34719873040?pr=29396
Passing -
https://github.com/MetaMask/metamask-extension/actions/runs/12435253146/job/34720674397?pr=29396

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2024
## **Description**

Remove broken MV3 reports. These reports relied upon data from the
`mv3-perf-stats` E2E test job, which itself relied upon the
`user-data-dir` chromedriver setting removed in #24696. They have been
broken since that PR.

These reports were very useful in prioritizing MV3 work at the time, but
we haven't needed them recently.

The `mv3-stats` E2E test suite has also been removed (this is an older
version of `mv3-perf-stats` that has been unused for even longer), along
with the charts that were used for this report.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29408?quickstart=1)

## **Related issues**

Relates to #28572

## **Manual testing steps**

Check that the `metamaskbot` comment no longer has the links to these
broken reports. They look like this:

- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants