isomorphic-git icon indicating copy to clipboard operation
isomorphic-git copied to clipboard

Switch CI pipeline to GitHub Actions

Open mojavelinux opened this issue 3 years ago • 26 comments

It would be a lot easier to maintain the CI pipeline if it was moved to GitHub Actions. It reduces the complexity of the CI set up and is better understood by the current maintainers. Using Azure requires managing and linking an extra account rather than using the one associated with the project. Using GitHub Actions also makes it easier to perform actions on the repository that require authentication, such as publishing to GitHub Pages.

When we make this change, we should switch the Node.js version from 10 to 16 so we can start upgrading and modernizing the build process...and so the library is actually tested on a supported version of Node.js.

mojavelinux avatar Feb 21 '22 10:02 mojavelinux

GitHub actions support matrix testing with different versions of Node. I think that we should use Node 12 or maybe Node 14 as lowers possible version that is supported. So those also need to run in CI. The end of life for 12 is in 2022-04-30. It's will be soon so maybe just Node 14 as LTS can be supported.

jcubic avatar Feb 21 '22 11:02 jcubic

Agreed. We should test the range of active releases.

mojavelinux avatar Feb 21 '22 11:02 mojavelinux

I think testing all active LTS releases makes sense. So 14 and 16?

SamVerschueren avatar Feb 21 '22 11:02 SamVerschueren

I don't know if we can migrate to GitHub Actions without access to NPM.

We must have that access to proceed. There is no future of this project without that.

mojavelinux avatar Feb 21 '22 20:02 mojavelinux

We'll also need to figure out how the website is built and integrate it into the release pipeline.

mojavelinux avatar Feb 21 '22 21:02 mojavelinux

The website isn't in the Azure Pipelines. Where's that build? https://dev.azure.com/isomorphic-git/isomorphic-git/_build?view=folders

Anyone have access to the source code to compare before/after or are we rebuilding from the logs?

seanpoulter avatar Mar 03 '24 04:03 seanpoulter

I have no idea it's in the azure file:

https://github.com/isomorphic-git/isomorphic-git/blob/main/azure-pipelines.yml#L79

Maybe it only runs and shows when the file in website directory changes.

jcubic avatar Mar 03 '24 11:03 jcubic

Ah, I was expecting a separate pipeline. That looks like what's running. Thanks @jcubic. image

Any other requests? We'll set it up with a Matrix so we can use the current Node v12 and other versions as we decide what to support.

seanpoulter avatar Mar 03 '24 21:03 seanpoulter

I wonder is it good idea to support Node 12. I'm not sure what version people are using. But according to End of Life the only LTS version that is still supported is Node 18.

jcubic avatar Mar 03 '24 23:03 jcubic

The code coverage and test results are published to Azure DevOps. That doesn't come out-of-the-box with GitHub Actions. Any input on we'd want? Do we want to push the results back to Azure DevOps? https://github.com/isomorphic-git/isomorphic-git/blob/79a38e017653a4dfe3b93e390bf3ffa73db42e82/azure-pipelines.yml#L41-L54

--

Do we still want to run the release pipeline every time we merge to main or beta? The website is published right after. https://github.com/isomorphic-git/isomorphic-git/blob/79a38e017653a4dfe3b93e390bf3ffa73db42e82/azure-pipelines.yml#L70-L77

--

Do we want to test this using the dryRun mode for semantic-release?

seanpoulter avatar Mar 06 '24 13:03 seanpoulter

Do we need Azure DevOps? I have no idea what they are used for.

jcubic avatar Mar 06 '24 20:03 jcubic

Do we want to push the results back to Azure DevOps?

I vote no. I'd like to see us get away from Azure DevOps and keep this CI as simple as possible. It's just too hard to maintain as it is now.

mojavelinux avatar Mar 06 '24 20:03 mojavelinux

I think that the whole Azure things was created before GitHub provided actions/workflows. I don't see any other reason for creating such a thing.

jcubic avatar Mar 06 '24 20:03 jcubic

There is a problem with unit tests again, not sure what is happening now. Again Azure DevOps:

https://github.com/isomorphic-git/isomorphic-git/issues/1876

jcubic avatar Mar 07 '24 20:03 jcubic

Do we need Azure DevOps? I have no idea what they are used for.

Azure DevOps has some really nice reporting on test results, flaky tests, and code coverage.

https://dev.azure.com/isomorphic-git/isomorphic-git/_build/results?buildId=3321&view=ms.vss-test-web.build-test-results-tab image

https://dev.azure.com/isomorphic-git/isomorphic-git/_build/results?buildId=3321&view=codecoverage-tab image

... keep this CI as simple as possible.

OK. There's a PR up. It'll need some of your time to set up the secrets before it'll work.

#1879

seanpoulter avatar Mar 08 '24 03:03 seanpoulter

Any feedback on #1901 folks? It seems like what we're expecting to me. 🎉

seanpoulter avatar Apr 20 '24 18:04 seanpoulter

Wow, it's great. I didn't check if the tests are passing after creating a PR.

It looks like everything is fine now.

We will only need to check if release is working with new pipeline.

jcubic avatar Apr 20 '24 19:04 jcubic

When we will merge next PR, we can see if everything is fine. Or I can merge and update the commit with "fix:" this should trigger the release, and we will see if everything is fine.

What you think? Or maybe we should wait for next real PR.

jcubic avatar Apr 20 '24 19:04 jcubic

@seanpoulter one more thing, can you maybe delete this old isomorphic-git-BETA-PR it's hanging like forever, we don't need this.

jcubic avatar Apr 20 '24 19:04 jcubic