Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. GitHub Actions radicalized me

GitHub Actions radicalized me

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
40 Posts 27 Posters 134 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q [email protected]

    The real problem is merging before waiting for that one slow CI pipeline to complete

    P This user is from outside of this forum
    P This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #31

    gitlab has a feature where you can set it to auto-merge when and if the CI completes successfully

    1 Reply Last reply
    8
    • B [email protected]
      • You write tests for functionality before you write the functionality.
      • You code the functionality so the tests pass.
      • Then, and only then, the test becomes a regression test and is enabled in your CI automation.
      • If the test ever breaks again the merge is blocked.

      I disagree. Merging should be blocked on any failing test. No commit should be merged to master with a failing test. If you want to write tests first, then do that on a feature branch, but squash the commits properly before merging. Or add them as disabled first and enable after the feature is implemented. The enabled tests must always pass on every commit on master.

      W This user is from outside of this forum
      W This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #32

      So I can never commit a test without also implementing the functionality?

      That's madness.

      B 1 Reply Last reply
      0
      • W [email protected]

        So I can never commit a test without also implementing the functionality?

        That's madness.

        B This user is from outside of this forum
        B This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #33

        You can, but not on master.

        1 Reply Last reply
        2
        • N [email protected]

          One problem is GHs auto-merge when ready button. It will merge when there are still tests running unless they are required. It would be much better if the auto merges took into account all checks and not just required ones.

          V This user is from outside of this forum
          V This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #34

          It tests passing is a requirement of merging, then you should set the tests as required.

          N B 2 Replies Last reply
          9
          • V [email protected]

            It tests passing is a requirement of merging, then you should set the tests as required.

            N This user is from outside of this forum
            N This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #35

            If you have folderA and folderB each with their own set of tests. You don't need folderAs tests to run with a change to folderB. Most CI/CD systems can do this easily enough with two different reports. But you cannot mark them both as required as they both wont always run. Instead you need a complicated fan out pipelines in your CICD system so you can only have one report back to GH or you need to always spawn a job for both folders and have the ones that dont need to run return successful. Neither of these is very good and becomes very complex when you are working with large monorepos.

            It would be much better if the CICD system that knows which pipelines it needs to run for a given PR could tell GH about which tests are required for a particular PR and if you could configure GH to wait for that report from the CICD system. Or at the very least if the auto-merge was blocked for any failed checks and the manual merge button was only blocked on required checks.

            V B 2 Replies Last reply
            1
            • N [email protected]

              If you have folderA and folderB each with their own set of tests. You don't need folderAs tests to run with a change to folderB. Most CI/CD systems can do this easily enough with two different reports. But you cannot mark them both as required as they both wont always run. Instead you need a complicated fan out pipelines in your CICD system so you can only have one report back to GH or you need to always spawn a job for both folders and have the ones that dont need to run return successful. Neither of these is very good and becomes very complex when you are working with large monorepos.

              It would be much better if the CICD system that knows which pipelines it needs to run for a given PR could tell GH about which tests are required for a particular PR and if you could configure GH to wait for that report from the CICD system. Or at the very least if the auto-merge was blocked for any failed checks and the manual merge button was only blocked on required checks.

              V This user is from outside of this forum
              V This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #36

              You can have certain jobs run based on what directories or files were modified. If projectA was the only one modified, it can run just projectA's tests.

              N 1 Reply Last reply
              2
              • N [email protected]

                If you have folderA and folderB each with their own set of tests. You don't need folderAs tests to run with a change to folderB. Most CI/CD systems can do this easily enough with two different reports. But you cannot mark them both as required as they both wont always run. Instead you need a complicated fan out pipelines in your CICD system so you can only have one report back to GH or you need to always spawn a job for both folders and have the ones that dont need to run return successful. Neither of these is very good and becomes very complex when you are working with large monorepos.

                It would be much better if the CICD system that knows which pipelines it needs to run for a given PR could tell GH about which tests are required for a particular PR and if you could configure GH to wait for that report from the CICD system. Or at the very least if the auto-merge was blocked for any failed checks and the manual merge button was only blocked on required checks.

                B This user is from outside of this forum
                B This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #37

                Both GitHub Actions and GitLab CI let you specify filepath rules for triggering jobs.

                1 Reply Last reply
                1
                • V [email protected]

                  It tests passing is a requirement of merging, then you should set the tests as required.

                  B This user is from outside of this forum
                  B This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #38

                  Exactly; the OP image is saying that there's no point to doing that.

                  1 Reply Last reply
                  0
                  • V [email protected]

                    You can have certain jobs run based on what directories or files were modified. If projectA was the only one modified, it can run just projectA's tests.

                    N This user is from outside of this forum
                    N This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #39

                    Yes. They can. But they do not mix well with required checks. From githubs own documentation:

                    If a workflow is skipped due to path filtering, branch filtering or a commit message, then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.

                    If, however, a job within a workflow is skipped due to a conditional, it will report its status as "Success". For more information, see Using conditions to control job execution.

                    So even with github actions you cannot mix a required check and path/branch or any filtering on a workflow as the jobs will hang forever and you will never be able to merge the branch in. You can do either or, but not both at once and for larger complex projects you tend to want to do both. But instead you need complex complex workflows or workflows that always start and instead do internal checks to detect if they need to actually run or not. And this is with github actions - it is worst for external CICD tooling.

                    1 Reply Last reply
                    0
                    • carrylex@lemmy.worldC [email protected]

                      Context: https://github.com/orgs/community/discussions/44490

                      B This user is from outside of this forum
                      B This user is from outside of this forum
                      [email protected]
                      wrote on last edited by [email protected]
                      #40

                      "You don't have the hiring and firing power."

                      -- Kitty, Arrested Development

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups