mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-11 07:49:02 +08:00
f387ad3dd4
* chore:(core): migrate to tsup * chore: migrate blockquote and bold to tsup * chore: migrated bubble-menu and bullet-list to tsup * chore: migrated more packages to tsup * chore: migrate code and character extensions to tsup * chore: update package.json to simplify build for all packages * chore: move all packages to tsup as a build process * chore: change ci build task * feat(pm): add prosemirror meta package * rfix: resolve issues with build paths & export mappings * docs: update documentation to include notes for @tiptap/pm * chore(pm): update tsconfig * chore(packages): update packages * fix(pm): add package export infos & fix dependencies * chore(general): start moving to pm package as deps * chore: move to tiptap pm package internally * fix(demos): fix demos working with new pm package * fix(tables): fix tables package * fix(tables): fix tables package * chore(demos): pinned typescript version * chore: remove unnecessary tsconfig * chore: fix netlify build * fix(demos): fix package resolving for pm packages * fix(tests): fix package resolving for pm packages * fix(tests): fix package resolving for pm packages * chore(tests): fix tests not running correctly after pm package * chore(pm): add files to files array * chore: update build workflow * chore(tests): increase timeout time back to 12s * chore(docs): update docs * chore(docs): update installation guides & pm information to docs * chore(docs): add link to prosemirror docs * fix(vue-3): add missing build step * chore(docs): comment out cdn link * chore(docs): remove semicolons from docs * chore(docs): remove unnecessary installation note * chore(docs): remove unnecessary installation note
176 lines
4.4 KiB
YAML
176 lines
4.4 KiB
YAML
# Automate, customize, and execute your software development workflows right in your repository with GitHub Actions.
|
|
# Documentation: https://docs.github.com/en/actions
|
|
|
|
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3.0.2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3.5.1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Load cached dependencies
|
|
uses: actions/cache@v3.0.11
|
|
id: cache
|
|
with:
|
|
path: |
|
|
**/node_modules
|
|
/home/runner/.cache/Cypress
|
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
id: install-dependencies
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: npm install
|
|
|
|
# - name: Fix code style linting errors
|
|
# id: lint-fix
|
|
# run: npm run lint:fix
|
|
# continue-on-error: true
|
|
#
|
|
# - name: Commit fixed linting errors
|
|
# id: commit
|
|
# uses: stefanzweifel/git-auto-commit-action@v4
|
|
# with:
|
|
# commit_message: "ci: fix code style linting errors"
|
|
|
|
- name: Lint code
|
|
id: lint
|
|
run: npm run lint
|
|
|
|
- name: Send Slack notifications
|
|
uses: act10ns/slack@v1
|
|
if: failure()
|
|
with:
|
|
status: ${{ job.status }}
|
|
steps: ${{ toJson(steps) }}
|
|
channel: '#tiptap-notifications'
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3.0.2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3.5.1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
id: install-dependencies
|
|
run: npm install
|
|
|
|
- name: Try to build the packages
|
|
id: build-packages
|
|
run: npm run build:pm
|
|
|
|
- name: Run tests with Cypress
|
|
id: cypress
|
|
uses: cypress-io/github-action@v4.2.0
|
|
with:
|
|
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
start: npm run start
|
|
wait-on: 'http://localhost:3000'
|
|
project: ./tests
|
|
browser: chrome
|
|
quiet: true
|
|
|
|
- name: Export screenshots (on failure only)
|
|
uses: actions/upload-artifact@v3.1.0
|
|
if: failure()
|
|
with:
|
|
name: cypress-screenshots
|
|
path: tests/cypress/screenshots
|
|
retention-days: 7
|
|
|
|
- name: Export screen recordings (on failure only)
|
|
uses: actions/upload-artifact@v3.1.0
|
|
if: failure()
|
|
with:
|
|
name: cypress-videos
|
|
path: tests/cypress/videos
|
|
retention-days: 7
|
|
|
|
- name: Send Slack notifications
|
|
uses: act10ns/slack@v1
|
|
if: failure()
|
|
with:
|
|
status: ${{ job.status }}
|
|
steps: ${{ toJson(steps) }}
|
|
channel: '#tiptap-notifications'
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: lint
|
|
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3.0.2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3.5.1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Load cached dependencies
|
|
uses: actions/cache@v3.0.11
|
|
id: cache
|
|
with:
|
|
path: |
|
|
**/node_modules
|
|
/home/runner/.cache/Cypress
|
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
id: install-dependencies
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: npm install
|
|
|
|
- name: Try to build the packages
|
|
id: build-packages
|
|
run: npm run build:ci
|
|
|
|
- name: Send Slack notifications
|
|
uses: act10ns/slack@v1
|
|
if: failure()
|
|
with:
|
|
status: ${{ job.status }}
|
|
steps: ${{ toJson(steps) }}
|
|
channel: '#tiptap-notifications'
|