gitlabform / gitlabform

🏗 Specialized configuration as a code tool for GitLab
https://gitlabform.github.io/gitlabform/
MIT License
393 stars 88 forks source link

Release only when tests pass #750

Closed gdubicki closed 1 month ago

gdubicki commented 1 month ago

and revamp the way we organize GitHub Actions code.

The "_" YAMLs are the workflows we run for the main branch, the PRs and for releases (tags beginning with "v").

The other YAMLs are being used in the above ones according to "reusable workflows" pattern (https://docs.github.com/en/actions/using-workflows/reusing-workflows).

It's not perfect, but I think it's easier to comprehend than what we had before.

gdubicki commented 1 month ago

Note: it's not tested, because it seems to be impossible without merging it. 😝

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.09%. Comparing base (03ce3fa) to head (73dc210).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/gitlabform/gitlabform/pull/750/graphs/tree.svg?width=650&height=150&src=pr&token=3g2AMN9IlC&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gitlabform)](https://app.codecov.io/gh/gitlabform/gitlabform/pull/750?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gitlabform) ```diff @@ Coverage Diff @@ ## main #750 +/- ## ========================================== - Coverage 85.92% 82.09% -3.83% ========================================== Files 70 70 Lines 2821 2821 ========================================== - Hits 2424 2316 -108 - Misses 397 505 +108 ``` [see 14 files with indirect coverage changes](https://app.codecov.io/gh/gitlabform/gitlabform/pull/750/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gitlabform)
TimKnight-DWP commented 1 month ago

@gdubicki - just seen on https://github.com/gitlabform/gitlabform/pull/746, if the Acceptance Tests have not yet completed, BUT we have triggered a Premium run and those pass -> GitHub will do an auto-merge if one has enabled auto-merge.

I was expecting it to wait for everything to be done.

Worth having a think about how we resolve that scenario? Only trigger Premium tests once all Standard Tests done and the Environment deploy is approved? OR prevent auto-merge whilst any check incomplete?

TimKnight-DWP commented 1 month ago

@gdubicki - just seen on #746, if the Acceptance Tests have not yet completed, BUT we have triggered a Premium run and those pass -> GitHub will do an auto-merge if one has enabled auto-merge.

I was expecting it to wait for everything to be done.

Worth having a think about how we resolve that scenario? Only trigger Premium tests once all Standard Tests done and the Environment deploy is approved? OR prevent auto-merge whilst any check incomplete?

This is a setting in the "Branch Protections" I am going to set it to require tests to pass