mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Update GH Actions workflow for monorepo
This commit is contained in:
parent
9afacdfd90
commit
1ec9d59305
44
.github/workflows/build.yml
vendored
Normal file
44
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
- name: Check types
|
||||||
|
run: npm run tsc
|
||||||
|
|
||||||
|
# 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
|
20
.github/workflows/jest.yml
vendored
20
.github/workflows/jest.yml
vendored
@ -1,20 +0,0 @@
|
|||||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
||||||
|
|
||||||
name: Jest Test
|
|
||||||
|
|
||||||
on: [ push, pull_request ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '14.x'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm test
|
|
Loading…
Reference in New Issue
Block a user