tiptap/.github/workflows/main.yml
2020-08-19 17:38:05 +02:00

57 lines
1.4 KiB
YAML

name: build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2.3.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore yarn cache directory
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: Cypress run
uses: cypress-io/github-action@v2
with:
browser: chrome
command: yarn run startandtest
- name: Export screenshots (on failure only)
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots
- name: Export screen recordings (on failure only)
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-videos
path: tests/cypress/videos