GitHub Action
Codecrafters Test
This GitHub Action is designed to facilitate running tests on your code when working on a challenge from CodeCrafters. It uses the CodeCrafters CLI to run tests and view test results from github.
Before using this GitHub Action, ensure you have:
- An active CodeCrafters account.
- Basic knowledge of YAML and GitHub Actions.
remote-url
: The git remote URL you get when you kick start a new challenge on CodeCrafters.io. It's recommended to keep this in a secret.
Here's how to integrate the this action into your GitHub workflow:
-
If not already present, create a workflow file (e.g.
main.yml
) in your.github/workflows
directory. -
Include the "Codecrafters Test" action in your workflow file. Below is an example snippet:
name: CodeCrafters Test on: [push, pull_request] jobs: codecrafters-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Run Codecrafters Test uses: silverhairs/codecrafters-test@v1 with: remote-url: ${{ secrets.CODECRAFTERS_REMOTE }} # Replace with your remote URL
-
Ensure the
remote-url
input is correctly set in thewith
section of your workflow. -
Save the changes to your workflow file and push them to your repository.
Contributions to enhance this action are always welcome. Feel free to fork the repository, make your improvements, and submit a pull request.