Skip to content

MNT: update github actions with logical sequence of tests - #500

Merged
Gui-FernandesBR merged 34 commits into
developfrom
mnt/update-github-actions
Dec 20, 2023
Merged

Gui-FernandesBR merged 34 commits into
developfrom
mnt/update-github-actions

Conversation

@Gui-FernandesBR

@Gui-FernandesBR Gui-FernandesBR commented Dec 3, 2023

Copy link
Copy Markdown
Member

Pull request type

  • ReadMe, Docs and GitHub updates

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant) (not relevant)

Current behavior

Important note: The skip-if-draft (#362) job is not working currently. I see some execution times up to 12 hours on our organization account, let's try to solve it (e.g. https://github.com/RocketPy-Team/RocketPy/actions/runs/7071607213)

New behavior

  • Updating the github workflows, specially the job of failure if marked as a draft.
  • The tests now are ran following a business sequence: first we run the unit test, than the "integration" tests, acceptance, documentation.
  • If the PR is going to the master branch, the pytest --runslow will also be triggered.
  • Code coverage report is shared among all the pytest executions
  • We are now caching the python libraries installed via pip
  • no longer automatically ask review from individuals rather than the code-owners

Breaking change

  • No

Additional information

Extra reading:

@Gui-FernandesBR
Gui-FernandesBR marked this pull request as ready for review December 3, 2023 05:50
@Gui-FernandesBR
Gui-FernandesBR marked this pull request as draft December 3, 2023 05:51
@Gui-FernandesBR
Gui-FernandesBR marked this pull request as ready for review December 3, 2023 05:54
@codecov

codecov Bot commented Dec 3, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f1367e3) 71.30% compared to head (38e8e46) 71.11%.
Report is 1 commits behind head on develop.

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #500      +/-   ##
===========================================
- Coverage    71.30%   71.11%   -0.19%     
===========================================
  Files           56       55       -1     
  Lines         9374     9279      -95     
===========================================
- Hits          6684     6599      -85     
+ Misses        2690     2680      -10     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gui-FernandesBR

Gui-FernandesBR commented Dec 3, 2023

Copy link
Copy Markdown
Member Author

Kinda doesn't work as expected. Gonna close it for a while so nobody reviews it, but we can take a deeper look in the short-future.

Please don't delete branch

@Gui-FernandesBR
Gui-FernandesBR changed the base branch from master to develop December 17, 2023 21:03
@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner December 17, 2023 21:03
@Gui-FernandesBR
Gui-FernandesBR force-pushed the mnt/update-github-actions branch from fb77af8 to 712920f Compare December 17, 2023 21:03
@Gui-FernandesBR
Gui-FernandesBR removed the request for review from giovaniceotto December 17, 2023 21:03
@Gui-FernandesBR Gui-FernandesBR changed the title GIT: fix the draft PR check if PR is a draft WIP: fix the draft PR check if PR is a draft Dec 17, 2023
@Gui-FernandesBR Gui-FernandesBR changed the title WIP: fix the draft PR check if PR is a draft MNT: update github actions with logical sequence of tests Dec 18, 2023
@Gui-FernandesBR Gui-FernandesBR self-assigned this Dec 18, 2023
@Gui-FernandesBR Gui-FernandesBR added the C.I. Continuous Integration (Workflows and actions) label Dec 18, 2023
@Gui-FernandesBR

Copy link
Copy Markdown
Member Author

After almost 4 hours spent on figuring out how the GitHub actions works, I believe I finally finished this one!!
It's open for a review @RocketPy-Team/code-owners !!

  • We need to urgently reduce the time spent on "integration" tests, they are consuming too much of our time. This not only drains the limited quota that we have on github actions but also let us waiting for about 15-20 minutes each time we want to validate the checks.
  • I tried to run concurrent jobs to open more runners at once on github in order to reduce the waiting time, but this was tricky since the amount of time speant on each runner will count for the final usage of github actions.
  • I also think that it should not be necessary to run pytest in all the 3 operational system every time. Maybe in the future we could trigger the 3 of them only wen targeting to the master branch. But I left as it is for now.
  • After approving, the 32 commits can be squashed into a single one, without any issues.

Final comment: This was the PR #500 :)

@Gui-FernandesBR

Copy link
Copy Markdown
Member Author

Also, I wonder why the tests on python 3.12 are much slower than the 3.8, it should be the opposite.

Comment thread .github/workflows/lint_black.yaml Outdated
@Gui-FernandesBR
Gui-FernandesBR force-pushed the mnt/update-github-actions branch from 374eefd to e1c6d6f Compare December 20, 2023 00:49
@Gui-FernandesBR
Gui-FernandesBR merged commit 08dae44 into develop Dec 20, 2023
@Gui-FernandesBR
Gui-FernandesBR deleted the mnt/update-github-actions branch December 20, 2023 00:50
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C.I. Continuous Integration (Workflows and actions)

Projects

No open projects
Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants