refactor #28
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
name: Test build | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and test on Node ${{ matrix.node }} and ${{ matrix.os }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['16.x', '18.x'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies and build (with cache) | |
uses: bahmutov/npm-install@v1 | |
- name: Test | |
run: npm test | |
- name: Build | |
run: npm run build |