Setup package #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
name: NodeJS CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# See https://nodejs.org/en/about/releases/ | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use NodeJS ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: Install and lint | |
run: | | |
npm install | |
npm link | |
npm run lint | |
soufle-ts --version | |
- name: Test and generate coverage report | |
run: npm test | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
name: codecov-umbrella | |
directory: ./coverage/ | |
fail_ci_if_error: true | |
verbose: true |