name: build

on:
  pull_request:
    branches:
      - master
      - develop
  push:
    branches:
      - master
      - develop

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
      - run: npm ci
      - run: $(npm bin)/node-http-server &
      - run: npm run test-ci
        env:
            CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_KEY}}
