Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch CI pipeline to GitHub Actions #1496

Open
mojavelinux opened this issue Feb 21, 2022 · 19 comments
Open

Switch CI pipeline to GitHub Actions #1496

mojavelinux opened this issue Feb 21, 2022 · 19 comments

Comments

@mojavelinux
Copy link
Contributor

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
Copy link
Contributor

jcubic commented Feb 21, 2022

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
Copy link
Contributor Author

Agreed. We should test the range of active releases.

@SamVerschueren
Copy link
Contributor

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

@mojavelinux
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@seanpoulter
Copy link
Contributor

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
Copy link
Contributor

jcubic commented Mar 3, 2024

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
Copy link
Contributor

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
Copy link
Contributor

jcubic commented Mar 3, 2024

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
Copy link
Contributor

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?

- task: PublishTestResults@2
displayName: 'Save test results'
condition: succeededOrFailed()
inputs:
testResultsFormat: JUnit
testResultsFiles: '$(System.DefaultWorkingDirectory)/junit/*.xml'
- task: PublishCodeCoverageResults@1
displayName: 'Save code coverage'
condition: and(succeededOrFailed(), ne(variables['system.pullrequest.isfork'], true))
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage/lcov-report'

--

Do we still want to run the release pipeline every time we merge to main or beta? The website is published right after.

- script: npm run semantic-release
displayName: 'Publish to npm'
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.SourceBranch'], 'refs/heads/beta')))
env:
GH_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(Npm.Token)
TWITTER_ACCESS_TOKEN_SECRET: $(TWITTER_ACCESS_TOKEN_SECRET)
TWITTER_CONSUMER_SECRET: $(TWITTER_CONSUMER_SECRET)

--

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

@jcubic
Copy link
Contributor

jcubic commented Mar 6, 2024

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

@mojavelinux
Copy link
Contributor Author

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
Copy link
Contributor

jcubic commented Mar 6, 2024

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
Copy link
Contributor

jcubic commented Mar 7, 2024

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

#1876

@seanpoulter
Copy link
Contributor

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
Copy link
Contributor

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

@jcubic
Copy link
Contributor

jcubic commented Apr 20, 2024

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
Copy link
Contributor

jcubic commented Apr 20, 2024

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
Copy link
Contributor

jcubic commented Apr 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants