MIRROR: Set up your GitHub Actions workflow with a specific version of node.js
Find a file
Danny McCormick 0258e952f5 v1
2019-08-01 09:07:49 -04:00
.github steps not actions 2019-07-25 22:59:58 -04:00
__tests__ Fix tests (#19) 2019-07-30 17:11:09 -04:00
docs Use husky to manage deps (#7) 2019-06-17 09:32:08 -04:00
externals Add installer 2019-06-05 15:17:00 -04:00
lib Revert "Add lts version (#17)" (#18) 2019-07-29 20:45:12 -04:00
node_modules Update tool-cache.js 2019-07-30 12:17:16 -04:00
src Revert "Add lts version (#17)" (#18) 2019-07-29 20:45:12 -04:00
toolkit Consume different tool-cache 2019-06-26 16:52:05 -04:00
.gitignore Use husky to manage deps (#7) 2019-06-17 09:32:08 -04:00
.prettierrc.json Add installer 2019-06-05 15:17:00 -04:00
action.yml Document lts option 2019-07-29 10:50:34 -04:00
jest.config.js Add installer 2019-06-05 15:17:00 -04:00
LICENSE init 2019-05-30 23:10:12 -04:00
package-lock.json v1 2019-08-01 09:07:49 -04:00
package.json v1 2019-08-01 09:07:49 -04:00
README.md v1 2019-08-01 09:07:49 -04:00
tsconfig.json Add installer 2019-06-05 15:17:00 -04:00

setup-node

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

Usage

See action.yml

Basic:

steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
  with:
    version: 10.x 
- run: npm install
- run: npm test

Matrix Testing:

jobs:
  build:
    strategy:
      matrix:
        node: [ 10, 8 ]
    name: Node ${{ matrix.node }} sample
    steps:
      - uses: actions/checkout@master
      - name: Setup node
        uses: actions/setup-node@v1
        with:
          version: ${{ matrix.node }}
      - run: npm install
      - run: npm test

License

The scripts and documentation in this project are released under the MIT License

Contributions

Contributions are welcome! See Contributor's Guide