2020-08-14 22:34:43 +08:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2020-08-19 23:30:52 +08:00
|
|
|
test:
|
2020-09-11 18:00:16 +08:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-14 22:34:43 +08:00
|
|
|
|
2020-09-11 17:40:35 +08:00
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
2020-08-14 22:34:43 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-08-20 20:45:38 +08:00
|
|
|
node-version: [14]
|
2020-08-14 22:34:43 +08:00
|
|
|
|
|
|
|
steps:
|
2020-08-19 23:28:46 +08:00
|
|
|
|
2020-08-14 22:34:43 +08:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v2.1.1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-08-19 23:28:46 +08:00
|
|
|
|
2020-08-20 20:45:38 +08:00
|
|
|
- uses: actions/checkout@v2.3.2
|
2020-08-19 23:28:46 +08:00
|
|
|
|
2020-08-20 21:10:16 +08:00
|
|
|
- name: Run tests with Cypress
|
2020-09-11 17:40:35 +08:00
|
|
|
id: cypress
|
2020-08-19 23:28:46 +08:00
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
with:
|
2020-08-20 20:45:38 +08:00
|
|
|
cache-key: node-v${{ matrix.node }}-on-${{ runner.os }}-hash-${{ hashFiles('yarn.lock') }}
|
|
|
|
start: yarn start
|
|
|
|
wait-on: 'http://localhost:3000'
|
2020-08-20 21:08:42 +08:00
|
|
|
project: ./tests
|
2020-08-19 23:28:46 +08:00
|
|
|
browser: chrome
|
|
|
|
|
2020-08-19 23:38:05 +08:00
|
|
|
- name: Export screenshots (on failure only)
|
2020-08-19 23:33:39 +08:00
|
|
|
uses: actions/upload-artifact@v1
|
2020-08-19 23:28:46 +08:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: cypress-screenshots
|
2020-08-19 23:33:39 +08:00
|
|
|
path: tests/cypress/screenshots
|
2020-08-19 23:28:46 +08:00
|
|
|
|
2020-08-19 23:38:05 +08:00
|
|
|
- name: Export screen recordings (on failure only)
|
2020-08-19 23:33:39 +08:00
|
|
|
uses: actions/upload-artifact@v1
|
2020-08-19 23:38:05 +08:00
|
|
|
if: failure()
|
2020-08-19 23:28:46 +08:00
|
|
|
with:
|
|
|
|
name: cypress-videos
|
2020-08-19 23:33:39 +08:00
|
|
|
path: tests/cypress/videos
|
2020-08-20 20:37:47 +08:00
|
|
|
|
2020-09-11 17:53:48 +08:00
|
|
|
- name: Send Slack notifications
|
2020-09-11 18:19:25 +08:00
|
|
|
uses: act10ns/slack@v1
|
2020-09-11 17:40:35 +08:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
steps: ${{ toJson(steps) }}
|
|
|
|
channel: '#tiptap-next'
|
|
|
|
if: failure()
|
|
|
|
|
2020-08-20 20:45:38 +08:00
|
|
|
build:
|
2020-09-11 18:00:16 +08:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-20 20:45:38 +08:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v2.1.1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2.3.2
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2020-09-11 17:40:35 +08:00
|
|
|
id: install-dependencies
|
2020-08-20 20:45:38 +08:00
|
|
|
run: yarn install
|
|
|
|
|
|
|
|
- name: Build packages dependencies
|
2020-09-11 17:40:35 +08:00
|
|
|
id: build-packages
|
2020-08-20 20:45:38 +08:00
|
|
|
run: yarn build:packages
|
2020-09-11 17:40:35 +08:00
|
|
|
|
2020-09-11 17:53:48 +08:00
|
|
|
- name: Send Slack notifications
|
|
|
|
uses: act10ns/slack@v1
|
2020-09-11 17:40:35 +08:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
steps: ${{ toJson(steps) }}
|
|
|
|
channel: '#tiptap-next'
|
|
|
|
if: failure()
|