mirror of https://github.com/actions/toolkit
df0101c5c3
* Create workflow.yml * Try lower version of node * Try running tests serially * Start jest directly * Start jest directly * Start jest directly * Start jest directly * Dont test exec on windows right now * Dont test exec on windows right now |
||
---|---|---|
.github | ||
docs | ||
packages | ||
res | ||
scripts | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
LICENSE.md | ||
README.md | ||
jest.config.js | ||
lerna.json | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Packages
Package | Description |
---|---|
@actions/core | Core functions for setting results, logging, secrets and environment variables |
@actions/exec | Functions necessary for running tools on the command line |
@actions/io | Core functions for CLI filesystem scenarios |
@actions/tool-cache | Functions necessary for downloading and caching tools |
Development
This repository uses Lerna to manage multiple packages. Read the documentation there to begin contributing.
Note that before a PR will be accepted, you must ensure:
- all tests are passing
npm run format
reports no issuesnpm run lint
reports no issues
Useful Scripts
npm run bootstrap
This runslerna bootstrap
which will install dependencies in this repository's packages and cross-link packages where necessary.npm run build
This compiles TypeScript code in each package (this is especially important if one package relies on changes in another when you're running tests). This is just an alias forlerna run tsc
.npm run format
This checks that formatting has been applied with Prettier.npm test
This runs all Jest tests in all packages in this repository.- If you need to run tests for only one package, you can pass normal Jest CLI options:
$ npm test -- packages/toolkit
- If you need to run tests for only one package, you can pass normal Jest CLI options:
npm run create-package [name]
This runs a script that automates a couple of parts of creating a new package.
Creating a Package
- In a new branch, create a new Lerna package:
$ npm run create-package new-package
This will ask you some questions about the new package. Start with 0.0.0
as the first version (look generally at some of the other packages for how the package.json is structured).
- Add
tsc
script to the new package's package.json file:
"scripts": {
"tsc": "tsc"
}
- Start developing 😄 and open a pull request.