Add workflow_dispatch for manual testing. #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions (.github/workflows/main.yml) | |
name: Node.js CI | |
on: | |
- pull_request: | |
branches: | |
- main | |
- workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["node", "14", "13", "12", "11", "10"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install project dependencies | |
run: npm install | |
- name: Run tests | |
run: npm test | |
- name: Run linting | |
run: npm run lint |