Merge pull request #34 from rwanyoike/prep-actions #3
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 package | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Set up NodeJS lts/* | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Run eslint checks | |
run: npm run lint | |
- name: Test with vitest | |
run: npm run test -- --coverage | |
- name: Build with vite | |
run: npm run build |