mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-12 16:59:01 +08:00
88 lines
1.9 KiB
YAML
88 lines
1.9 KiB
YAML
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
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: Run tests with Cypress
|
|
id: cypress
|
|
uses: cypress-io/github-action@v2
|
|
with:
|
|
cache-key: node-v${{ matrix.node }}-on-${{ runner.os }}-hash-${{ hashFiles('yarn.lock') }}
|
|
start: yarn start
|
|
wait-on: 'http://localhost:3000'
|
|
project: ./tests
|
|
browser: chrome
|
|
|
|
- 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
|
|
|
|
- name: Send Slack notifications
|
|
uses: act10ns/slack@v1
|
|
with:
|
|
status: ${{ job.status }}
|
|
steps: ${{ toJson(steps) }}
|
|
channel: '#tiptap-next'
|
|
if: failure()
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
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
|
|
id: install-dependencies
|
|
run: yarn install
|
|
|
|
- name: Build packages dependencies
|
|
id: build-packages
|
|
run: yarn build:packages
|
|
|
|
- name: Send Slack notifications
|
|
uses: act10ns/slack@v1
|
|
with:
|
|
status: ${{ job.status }}
|
|
steps: ${{ toJson(steps) }}
|
|
channel: '#tiptap-next'
|
|
if: failure()
|