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

Create pipeline to lint and test #32

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

arthurbdiniz
Copy link
Contributor

Summary

This pull request introduces a CI pipeline that sets up automated testing and shellcheck for the project.

Details:

Created a GitHub Actions workflow to run automated tests and shellcheck on every push and pull request targeting the main branch.

Shellcheck Job:

  • Runs on the latest Ubuntu runner.
  • Installs shellcheck to lint the wcurl scripts.
  • Executes shellcheck on the shell scripts in the tests/ directory to identify potential issues.

Test Job:

  • Runs on both Ubuntu and macOS runners to ensure cross-platform compatibility.
  • Installs shunit2 (required for running tests) based on the operating system.
  • Executes the tests using shunit2 on the tests/ directory to validate the project functionality.

Instructions for Testing:

No manual testing is required as this pipeline is automated. It will be triggered on every push and pull request, ensuring that all scripts are linted and tested for issues.

Dependencies

Before merge this Pull Request we need to make sure the #31 is merged otherwise the shellcheck will fail.

@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch from 0f2ca9f to a8dfeda Compare December 7, 2024 17:06
Copy link
Member

@samueloph samueloph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version of the step actions/checkout needs to be updated to v4 and the tests are currently failing, likely due to the way they are called: shunit2 tests/*, they should instead be called with ./tests/tests.sh.

I have left a few other comments, but they are all things that can be done in a different PR, it's just so I don't forget to open issues to track those features.

.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch 2 times, most recently from 55e6932 to 0bd93bc Compare December 7, 2024 21:21
@arthurbdiniz arthurbdiniz changed the title Create pipeline for tests and shellcheck Create pipeline for tests, lint Dec 7, 2024
@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch from 0bd93bc to 6ed6f3c Compare December 7, 2024 22:57
@arthurbdiniz arthurbdiniz changed the title Create pipeline for tests, lint Create pipeline to lint and test Dec 7, 2024
@samueloph
Copy link
Member

I've spoke to Arthur and mentioned that the CI in the PR needs to pass before we review it again.

@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch 3 times, most recently from 5c528c9 to b0de4a0 Compare December 9, 2024 21:27
@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch from b0de4a0 to 2f5dc17 Compare December 9, 2024 21:33
Closes: curl#29

Signed-off-by: Arthur Diniz <[email protected]>
@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch from 2f5dc17 to 96505b6 Compare December 9, 2024 22:01
README.md Outdated Show resolved Hide resolved
@arthurbdiniz arthurbdiniz force-pushed the test-github-actions-pipeline branch from 96505b6 to a428ccd Compare December 9, 2024 22:35
@samueloph samueloph merged commit ea192a3 into curl:main Dec 9, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants