Merge pull request #3 from Tengs-Penkwe/basic #4
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: Node.js CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x, 21.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Compile TypeScript | |
run: yarn tsc | |
- name: Run linter | |
run: yarn lint | |
- name: Run prettier check | |
run: yarn pretty --check | |
- name: Run tests with coverage | |
run: yarn cover | |
- name: Run all tests | |
run: yarn test | |