isomorphic-git / isomorphic-git

A pure JavaScript implementation of git for node and browsers!
https://isomorphic-git.org
MIT License
7.45k stars 374 forks source link

Switch CI pipeline to GitHub Actions #1496

Open mojavelinux opened 2 years ago

mojavelinux commented 2 years ago

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.

jcubic commented 2 years ago

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.

mojavelinux commented 2 years ago

Agreed. We should test the range of active releases.

SamVerschueren commented 2 years ago

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

mojavelinux commented 2 years ago

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 commented 2 years ago

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

seanpoulter commented 7 months ago

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?

jcubic commented 7 months ago

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.

seanpoulter commented 7 months ago

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.

jcubic commented 7 months ago

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.

seanpoulter commented 6 months ago

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?

jcubic commented 6 months ago

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

mojavelinux commented 6 months ago

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.

jcubic commented 6 months ago

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 commented 6 months ago

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

seanpoulter commented 6 months ago

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 commented 5 months ago

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

jcubic commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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