MIRROR: Set up your GitHub Actions workflow with a specific version of node.js
Find a file
Danny McCormick 075e678472
Use husky to manage deps (#7)
* Add husky

* Update docs

* Don't ignore node_modules
2019-06-17 09:32:08 -04:00
__tests__ Add installer 2019-06-05 15:17:00 -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 Add installer 2019-06-05 15:17:00 -04:00
node_modules Add installer 2019-06-05 15:17:00 -04:00
src Add installer 2019-06-05 15:17:00 -04:00
toolkit Add installer 2019-06-05 15:17:00 -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 Add installer 2019-06-05 15:17:00 -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 Use husky to manage deps (#7) 2019-06-17 09:32:08 -04:00
package.json Use husky to manage deps (#7) 2019-06-17 09:32:08 -04:00
README.md Change workflow: to jobs: in README (#4) 2019-06-07 15:23:54 -04:00
tsconfig.json Add installer 2019-06-05 15:17:00 -04:00

@actions/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
  • TODO: registering problem matchers for error output
  • TODO: configuring authentication for npm packages
  • TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners)

Usage

See action.yml

Basic:

actions:
- uses: actions/setup-node@latest
  with:
    version: 10.x 
- run: npm install
- run: npm test

Matrix Testing:

jobs:
  build:
    strategy:
      matrix:
        node: [ 10, 8 ]
    name: Node ${{ matrix.node }} sample
    actions:
      - 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

Contributions

Contributions are welcome! See Contributor's Guide