Add Github action for building, linting and testing (#37) #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: Build, lint, and test | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build typescript | |
run: npm run tsc | |
- name: Run ESLint | |
run: npm run lint | |
# TODO Uncomment when tests are added | |
# - name: Run tests | |
# run: npm test | |
- name: Build package | |
run: npm run build |