48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Node toolchain
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "12.x"
|
|
|
|
- name: Cache PureScript dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
|
|
path: |
|
|
.spago
|
|
output
|
|
|
|
- name: Cache NPM dependencies
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install NPM dependencies
|
|
run: npm install
|
|
|
|
- name: Build the project
|
|
run: npm run build
|
|
|
|
- name: Run the tests
|
|
run: npm run test
|