Until he actually had to use it.

Took 2 hours of reading through examples just to deploy the site.
Turns out, it is hard to do even just the bash stuff when you can’t see the container.

  • akash_rawal@lemmy.world
    link
    fedilink
    arrow-up
    46
    ·
    2 years ago

    Time for the yearly barrage of “Setup CI”…“Fix CI” commits.

    That is my experience with basically every CI service out there.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      28
      ·
      2 years ago

      Normally, you don’t want to commit code unless it’s been at least minimally tested, and preferably more than that.

      All the CI’s, however, force a workflow where you can only test it by committing the code and seeing if it works. I’m not sure how to fix that, but I see the problem.

      • Ajen@sh.itjust.works
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        Line the other commenter said, there’s nothing wrong with committing temp/untested code to a feature branch as long as you clean it up before the PR.

        • frezik@midwest.social
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          There are issues that come up in niche cases. If you’re using git bisect to track down a bug, a non-working commit can throw that off.

          • Ajen@sh.itjust.works
            link
            fedilink
            arrow-up
            7
            ·
            2 years ago

            You might have misunderstood what I meant by “clean up before the PR.” None of the temp commits should end up in the main branch, where people would be bisecting.

      • akash_rawal@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        We test our code locally, but we cannot test the workflow. By definition, testing the workflow has to be done on a CI-like system.

        There is nektos/act for running github actions locally, it works for simple cases. There still are many differences between act and github actions.

        It might be possible for a CI to define workflow steps using Containerfile/Dockerfile. Such workflows would be reproducible locally.

  • GetOffMyLan@programming.dev
    link
    fedilink
    arrow-up
    26
    arrow-down
    1
    ·
    2 years ago

    Every time I create a new repo haha I usually just delete the runs and squash the commits so it looks like I got it first time.

  • MP3Martin@programming.dev
    link
    fedilink
    arrow-up
    18
    ·
    2 years ago

    This also used to happen to me

    What i recommend is to create a private repo with the same content, create and test the workflow file there and copy it back into the main repo when you get it to work.

  • TrickDacy@lemmy.world
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    2 years ago

    There’s a vscode extension, I think called GHA, which validates your workflow yaml inline so you can avoid a lot of that trial and error.

  • _____@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 years ago

    GitHub CI is great. too great. some devs have taken it upon their hands to attempt and wield an unwieldy power.

    and unfortunately at my work it is my job to fix that unwieldy power

    • ulterno@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Guess GitHub can now claim to have created a lot more jobs.

      Next, for me to check out GitLab CI.

      And then keep a minimalist git serving solution for my own use.

  • mesa@lemmy.worlddeleted by creator
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 years ago

    Instead of using up time/$$ on github actions, you should try running the script locally to make sure everything works before commiting: https://github.com/nektos/act

    Github CI still feels like an alpha project sometimes. Certain stacks look like they are supported, but it can be difficult to do the same thing as other CI tools (like GitLab/CircleCI/etc…) such as running things locally. Their tool will get you 95% of the way there. Other tools will also allow you to ssh into the box itself (Gitlab/Circleci) which is extremity useful when debugging scripts/processes.

    My personal opinion is that github actions is a work in progress given the state of much of the community. GitLab has much better tools. But this is a great learning experience for sure. And more projects that use CI/CD the better!

    • ulterno@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      allow you to ssh into the box itself (Gitlab/Circleci)

      In that case, things just get way easier. I can just check it out like a normal system.

      • mesa@lemmy.worlddeleted by creator
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        yep! After doing CI/CD for close to 10 years, its one of the things Travis/CircleCI/GitLab has done that make it soooo much easier to debug. Saves time and sanity. Because as much as we hate it, sometimes the only way to debug is to actually dig into the system your working under.

        Docker helps as well.