All contributions are welcome and greatly appreciated! However, please try to keep them limited in scope so that they can be more easily reviewed.
Warning
Check the engine
property in package.json
to see what
version of Node.js is required for local development. This can be different
from the version of Node.js used on the GitHub Actions runners. Tools like
nodenv can be used to manage your Node.js
version automatically.
-
Fork this repository
-
Clone your fork
-
Install the dependencies with
npm install
-
Make and test your changes
-
Commit your changes
Make sure to do the following when you commit your changes:
- Increase the version number in
package.json
- Run
npm install
to ensure dependencies are up to date - Run
npm run all
to run formatting, linting, etc.
- Increase the version number in
-
Open a pull request back to this repository
-
Notify the maintainers of this repository for peer review and approval
-
Merge 🎉
The maintainers of this repository will create a new release with your changes so that everyone can enjoy your contributions!
This project requires 100% test coverage.
Important
It is critical that we have 100% test coverage to ensure that we are not introducing any regressions. All changes will be throughly tested by maintainers of this repository before a new release is created.
As you make changes, it's a great idea to run the local-action
tool regularly
against various repositories with different configurations.
-
Symlink your package folder (this should only need to be done once)
npm link
-
Test your updated version
local-action run <path> <entrypoint> <dotenv file> # Or... npm exec local-action run <path> <entrypoint> <dotenv file>
Once you're finished testing, make sure to unlink!
npm unlink @github/local-action
After making updates and running the test suite, please also make sure to test your updates using the following GitHub Actions repositories:
-
Clone each repository locally
-
From your
github/local-action
fork, test each actionnpm exec local-action \ "/<action repository clone path>/typescript-action" \ "src/main.ts" \ "<path to your .env file>" npm exec local-action \ "/<action repository clone path>/javascript-action" \ "src/main.ts" \ "<path to your .env file>"
For an example
.env
file to use for testing, see.env.example
.
Simply run the following command to invoke the entire test suite:
npm run test
Note
This requires that you have already run npm install