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

Replace Circle CI with GitHub CI #3604

Merged
merged 11 commits into from
Jan 12, 2023
Merged

Replace Circle CI with GitHub CI #3604

merged 11 commits into from
Jan 12, 2023

Conversation

kubk
Copy link
Collaborator

@kubk kubk commented Jan 10, 2023

There is a new Build and check check that includes all the checks from the Circle CI config file

@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2023

⚠️ No Changeset found

Latest commit: 26154fe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kubk kubk marked this pull request as draft January 10, 2023 07:55
@kubk kubk marked this pull request as ready for review January 10, 2023 08:49
@@ -1,6 +1,6 @@
name: Coveralls

on: ["push", "pull_request"]
on: ["push"]
Copy link
Collaborator Author

@kubk kubk Jan 10, 2023

Choose a reason for hiding this comment

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

This line caused coveralls to run twice on each PR. Example: #3603

Screenshot 2023-01-10 at 11 50 34

It should be enough to run it once

Copy link
Member

@iChenLei iChenLei Jan 10, 2023

Choose a reason for hiding this comment

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

If remove pull_request options, PR(before merged) will not trigger CI.

run: yarn mobx test:flow

- name: Test performance
run: yarn mobx test:performance
Copy link
Collaborator Author

@kubk kubk Jan 10, 2023

Choose a reason for hiding this comment

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

Initially I wanted to have multiple dependant jobs (like build <- test, build <- test size) the same way it was implemented in CircleCI config. On CircleCI it was done using persist_to_workspace option:

- persist_to_workspace:

There is an alternative way doing so using GitHub actions: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow

But each time I added actions/upload-artifact@v3 to the config the pipeline mysteriously disappeared from the check list and I saw only coveralls checks: b9b473d

Screenshot 2023-01-10 at 11 55 32

So I decided to keep it flat and it worked.

@kubk
Copy link
Collaborator Author

kubk commented Jan 10, 2023

The only thing that I didn't cover here is creating artifacts out of test:performance command:

https://github.com/mobxjs/mobx/blob/19de5da5c4e98e61b67e6176cc3a95c94d013bbd/.circleci/config.yml#L49+L52

Can someone describe why was it needed?

@urugator
Copy link
Collaborator

Can someone describe why was it needed?

I would assume so you can investigate/compare the results. The test itself doesn't pose any limits, you have to check the results manually.

@kubk
Copy link
Collaborator Author

kubk commented Jan 11, 2023

@urugator Yes, it doesn't pose any limits. GitHub CI shows the whole output of the command so it looks like we don't need to create artifacts out of the performance result anymore:

Screenshot 2023-01-11 at 20 23 24

@urugator
Copy link
Collaborator

urugator commented Jan 11, 2023

Well you could see the same output on CircleCI or not? So I guess that wasn't readable/convinient enough ... I dunno, @mweststrate will know better. Just for reference the report alone looks like this:

One observers many observes one - Started/Updated in 33/29 ms.
500 props observing sibling -  Started/Updated in 1/2 ms.
Late dependency change - Updated in 79ms.
Unused computables -   Updated in 0 ms.
Unused observables -  Updated in 17 ms.
Array reduce -  Started/Updated in 30/34 ms.
Array loop -  Started/Updated in 155/283 ms.
Order system batched: false tracked: true  Started/Updated in 353/48 ms.
Order system batched: true tracked: true  Started/Updated in 79/55 ms.
Order system batched: false tracked: false  Started/Updated in 111/29 ms.
Order system batched: true tracked: false  Started/Updated in 93/29 ms.

Create array -  Created in 95ms.

Create array (non-recursive)  Created in 43ms.
Observable with many observers  + dispose: 287ms
expensive sort: created 1614
expensive sort: updated 7802
expensive sort: disposed 184
native plain sort: updated 271
computed memoization 4ms
Initilizing 100000 maps: 45 ms.
Looking up 100 map properties 1000 times: 8 ms.
Setting and deleting 100 map properties 1000 times: 62 ms.


Completed performance suite in 12.327 sec.

Is it about that actions/upload-artifact@v3 issue or you just want to simplify it?

@kubk
Copy link
Collaborator Author

kubk commented Jan 12, 2023

@urugator It's not related to actions/upload-artifact@v3, I just don't understand how this artifact uploading in CircleCi supposed to work and who use it among maintainers. Sure, lets wait for Michel's input 👍

@mweststrate
Copy link
Member

Oh wow, I never knew perf artifacts were saved, so I never looked at them :-). So I think the setup as is is fine with one job. The primary thing about perf tests is to make sure they don't break by a PR. I'm fine to just run those tests locally whenever we have a PR we fear might affect them. I'll disable the circle ci tests above as well to make sure they don't block anything anymore.

@kubk
Copy link
Collaborator Author

kubk commented Jan 12, 2023

@mweststrate Thanks, I see that Circle CI is no longer blocking the CI. May I merge this?

@mweststrate
Copy link
Member

Yes, LGTM! Thanks for picking up!

@kubk kubk merged commit 1fcb2e1 into main Jan 12, 2023
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