jsPsych/.github/workflows/build.yml
bjoluc ed87f4086d Skip explicit type checking in build workflow
to speed up builds. It's safe to do since the rollup builds check types
already.
2021-09-14 20:51:23 +02:00

42 lines
923 B
YAML

name: build
on: [push, pull_request]
env:
HUSKY: 0
jobs:
test:
name: Build, lint, and test on Node.js ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install npm@v7
run: npm install -g npm@7
- name: Install dependencies and build packages
run: npm ci
# TODO setup linting
# - name: Lint
# run: npm run lint
- name: Run tests
run: npm run test -- --ci --coverage --maxWorkers=2
env:
NODE_OPTIONS: "--max-old-space-size=4096" # Increase heap size for jest
# TODO setup codecov or coveralls
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1