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

Reorganize GitHub Actions #1041

Closed
wants to merge 9 commits into from
Closed

Reorganize GitHub Actions #1041

wants to merge 9 commits into from

Conversation

mwouts
Copy link
Owner

@mwouts mwouts commented Feb 19, 2023

Thank you @matthewfeickert for your recommendations at #1037 !

I have tried to implement those in this PR. If you have a minute to have a look that would be great! Thank you.

@mwouts
Copy link
Owner Author

mwouts commented Feb 19, 2023

Well I'm not sure I am using concurrency in the right way. What I wanted to do with skip_duplicate was to not run the same actions twice when there is both a push and a pull_request event. Is that something one can avoid with concurrency? Or maybe I just need to append the step name to the concurrency group?

@mwouts
Copy link
Owner Author

mwouts commented Feb 19, 2023

Well if my understanding is correct, concurrency will ensure that I don't get two runs for the same action on the same branch, which is useful.

However I see duplicated runs on push and pull_request events:
image

To avoid these I will use the skip_duplicate action.

@codecov
Copy link

codecov bot commented Feb 19, 2023

Codecov Report

Merging #1041 (dbdc841) into main (e097422) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head dbdc841 differs from pull request most recent head ee2c0b5. Consider uploading reports for the commit ee2c0b5 to get more accurate results

@@            Coverage Diff             @@
##             main    #1041      +/-   ##
==========================================
- Coverage   99.02%   98.99%   -0.04%     
==========================================
  Files         119      119              
  Lines       11030    11030              
==========================================
- Hits        10923    10919       -4     
- Misses        107      111       +4     
Impacted Files Coverage Δ
jupytext/version.py 100.00% <100.00%> (ø)
jupytext/__main__.py 0.00% <0.00%> (-100.00%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mwouts
Copy link
Owner Author

mwouts commented Feb 19, 2023

I have removed the trigger on pull_request events as I could not find out how to skip duplicates among workflows. However, I am not sure what happens when someone opens a PR from a branch on a fork - will the workflow run at all? @matthewfeickert would you mind opening a PR from a fork of this branch, with an additional commit? Thank you!

@matthewfeickert
Copy link
Contributor

👍 I'm traveling this week so won't have much time to look at this till maybe Tuesday.

@mwouts
Copy link
Owner Author

mwouts commented Feb 19, 2023

Sure this can wait! No hurry at all. And thanks for helping me with this!

@LecrisUT
Copy link
Contributor

However, I am not sure what happens when someone opens a PR from a branch on a fork - will the workflow run at all?

This is up to the settings of the repo. By default someone has to approve the workflow before it runs. The PR author can always make a PR on their own forks to run the jobs though

@LecrisUT
Copy link
Contributor

Well if my understanding is correct, concurrency will ensure that I don't get two runs for the same action on the same branch, which is useful.

However I see duplicated runs on push and pull_request events: image

To avoid these I will use the skip_duplicate action.

I think you had it right on that commit. The issue is that the previous commit did noy have the concurrency on the root so those two actions were incompatible so it didn't have the predicted effect

Copy link
Contributor

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

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

Hope the code review helps. I can't review the codeql part because I'm not familiar with it. But shouldn't it be in the CI?

.github/workflows/codeql-analysis.yml Show resolved Hide resolved
@@ -3,37 +3,16 @@ on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same trigger as above

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see. At #1084 I have keep everything in the same file for now.

.github/workflows/pre-commit.yml Show resolved Hide resolved
.github/workflows/publish.yml Show resolved Hide resolved
python -m pip install wheel jupyter-packaging jupyterlab>=3
BUILD_JUPYTERLAB_EXTENSION=1 python setup.py sdist bdist_wheel
# Don't publish a tar.gz file over 1MB (Issue #730)
if (($(wc -c < dist/*.tar.gz) > 1000000)); then exit 1; fi
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the deal with this test? It should be in the CI.

But beware that distro pacakagers rely on the fact that sdist is a superset of git archive. Of course you can remove files like .github, but consult with a distro packager to be safe. E.g. the maintainers of python3-jupytext on fedora. I can do a quick lookover if you point me to the sdist ignore list.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I agree that this belongs to the CI.

I am not sure I am following your second comment, sorry. This file: MANIFEST.in controls what goes into the package.

Copy link
Contributor

Choose a reason for hiding this comment

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

My reading of that check was so that you make sure that large filea are not being packaged right? Well about that, they should be packaged because distro maintainers expect that all relevant files are available on PyPI as well as other generated files.

.github/workflows/publish.yml Show resolved Hide resolved
.github/workflows/continuous-integration.yml Show resolved Hide resolved
.github/workflows/continuous-integration.yml Show resolved Hide resolved
.github/workflows/continuous-integration.yml Show resolved Hide resolved
.github/workflows/continuous-integration.yml Show resolved Hide resolved
@mwouts
Copy link
Owner Author

mwouts commented Jun 18, 2023

Thank you @LecrisUT for your comments. Very helpful. It might take me some time to address them all but I'll surely try.

@mwouts mwouts marked this pull request as draft June 21, 2023 22:51
@mwouts mwouts closed this Jun 24, 2023
@mwouts
Copy link
Owner Author

mwouts commented Jun 24, 2023

Closed in favor of #1084

@mwouts mwouts deleted the reorganize_ci branch June 24, 2023 16:41
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.

3 participants