A library of commonly used commands for your CI builds.
For a directory structure that looks like:
my-project/
├── node_modules/
├── package.json
├── package-lock.json
Add the following to your pipeline.yml
:
steps:
- command: |
# To persist the cache
save_cache node_modules/ $(hash_file package-lock.json)
# To restore the cache, if present
restore_cache $(hash_file package-lock.json)
plugins:
- automattic/a8c-ci-toolkit#3.0.0:
bucket: a8c-ci-cache # optional
Don't forget to verify what the latest release is and use that value instead of 3.0.0
.
The name of the S3 bucket to fallback to if the CACHE_BUCKET_NAME
environment variable is not set in the CI host. Use by save_cache
and restore_cache
.
To run the linter and tests:
make lint
make test
- Fork the repo
- Make the changes
- Run the tests
- Commit and push your changes
- Send a pull request