setup-node/README.md

48 lines
963 B
Markdown
Raw Normal View History

# setup-node
2019-05-30 23:10:12 -04:00
This action sets by node environment for use in actions by:
- optionally downloading and caching a version of node - npm by version spec and add to PATH
- registering problem matchers for error output
2019-05-30 23:10:12 -04:00
# Usage
See [action.yml](action.yml)
Basic:
```yaml
actions:
2019-07-23 15:16:56 -04:00
- uses: actions/checkout@latest
2019-05-30 23:10:12 -04:00
- uses: actions/setup-node@latest
with:
version: 10.x
- run: npm install
- run: npm test
```
Matrix Testing:
```yaml
jobs:
2019-05-30 23:10:12 -04:00
build:
strategy:
matrix:
node: [ 10, 8 ]
name: Node ${{ matrix.node }} sample
actions:
2019-07-23 15:16:56 -04:00
- uses: actions/checkout@latest
2019-05-30 23:10:12 -04:00
- name: Setup node
uses: actions/setup-node@latest
with:
version: ${{ matrix.node }}
- run: npm install
- run: npm test
```
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)
# Contributions
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)