Skip to content

Commit

Permalink
build: ci running again
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Jan 2, 2025
1 parent c476d51 commit 6d9c693
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 59 deletions.
39 changes: 31 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

name: build

env:
PNPM_VERSION: 9.15.2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -33,10 +36,16 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Load cached dependencies
uses: actions/[email protected]
Expand All @@ -46,12 +55,12 @@ jobs:
**/node_modules
**/.turbo
/home/runner/.cache/Cypress
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install dependencies
id: install-dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
run: pnpm install

# - name: Fix code style linting errors
# id: lint-fix
Expand Down Expand Up @@ -90,25 +99,32 @@ jobs:
steps:
- uses: actions/[email protected]


- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
id: install-dependencies
run: npm install
run: pnpm install

- name: Try to build the packages
id: build-packages
run: npm run build:pm
run: pnpm run build:pm

- name: Test ${{ matrix.test-spec.name }}
id: cypress
uses: cypress-io/[email protected]
with:
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
start: npm run serve
start: pnpm run serve
wait-on: 'http://localhost:3000'
spec: ${{ matrix.test-spec.spec }}
project: ./tests
Expand Down Expand Up @@ -143,10 +159,17 @@ jobs:
steps:
- uses: actions/[email protected]


- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Load cached dependencies
uses: actions/[email protected]
Expand All @@ -156,16 +179,16 @@ jobs:
**/node_modules
**/.turbo
/home/runner/.cache/Cypress
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install dependencies
id: install-dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
run: pnpm install

- name: Try to build the packages
id: build-packages
run: npm run build:ci
run: pnpm run build:ci

- name: Soft release
id: soft-release
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish

env:
PNPM_VERSION: 9.15.2

on:
push:
branches:
Expand Down Expand Up @@ -31,11 +34,17 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4


- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'

- name: Load cached dependencies
uses: actions/[email protected]
Expand All @@ -45,18 +54,18 @@ jobs:
**/node_modules
**/.turbo
/home/runner/.cache/Cypress
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install Dependencies
run: npm ci
run: pnpm i

- name: Create Release PR or publish stable version to npm
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: false
publish: npm run publish
version: npm run version
publish: pnpm run publish
version: pnpm run version
title: ${{ github.ref_name == 'main' && 'Publish a new stable version' || 'Publish a new pre-release version' }}
commit: >-
${{ github.ref_name == 'main' && 'chore(release): publish a new release version' || 'chore(release): publish a new pre-release version' }}
Expand Down
3 changes: 0 additions & 3 deletions .lintstagedrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"remixicon": "^2.5.0",
"shiki": "^1.25.1",
"simplify-js": "^1.2.4",
"y-prosemirror": "1.2.11",
"y-prosemirror": "^1",
"y-webrtc": "^10.3.0",
"yjs": "13.6.18"
"yjs": "^13"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "3.1.2",
Expand Down
11 changes: 0 additions & 11 deletions demos/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@ import {
import { v4 as uuid } from 'uuid'
import { defineConfig } from 'vite'

// import checker from 'vite-plugin-checker'

const getPackageDependencies = () => {
const paths: Array<{ find: string, replacement: any }> = []

paths.push({
find: 'yjs',
replacement: resolve('../node_modules/yjs/src/index.js'),
})
paths.push({
find: 'y-prosemirror',
replacement: resolve('../node_modules/y-prosemirror/src/y-prosemirror.js'),
})

fg.sync('../packages/*', { onlyDirectories: true })
.map(name => name.replace('../packages/', ''))
.forEach(name => {
Expand Down
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
],
"scripts": {
"cz": "cz",
"start": "npm --prefix ./demos run start",
"dev": "npm run start",
"start": "pnpm --prefix ./demos run start",
"dev": "pnpm run start",
"lint": "eslint --cache --quiet --no-error-on-unmatched-pattern ./",
"lint:fix": "eslint --fix --cache --quiet --no-error-on-unmatched-pattern ./",
"lint:staged": "lint-staged",
"test:open": "cypress open --project tests",
"test:run": "cypress run --project tests",
"test": "npm run build:pm && npm run test:run",
"test": "pnpm run build:pm && pnpm run test:run",
"build": "turbo build",
"build:pm": "turbo build --filter=@tiptap/pm",
"build:demos": "npm run build:demos --workspace demos",
"serve": "npm run build:demos && npx http-server ./demos/dist -p 3000",
"build:demos": "pnpm run build:demos --workspace demos",
"serve": "pnpm run build:demos && npx http-server ./demos/dist -p 3000",
"build:ci": "turbo run build",
"publish": "npm run build && npm run changeset publish",
"publish": "pnpm run build && pnpm run changeset publish",
"clean:packages": "rm -rf ./packages/*/dist && rm -rf ./packages/pm/*/dist",
"clean:packs": "rm -rf ./packages/*/*.tgz",
"reset": "npm run clean:packages && npm run clean:packs && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./package-lock.json && npm install",
"reset": "pnpm run clean:packages && pnpm run clean:packs && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./package-lock.json && pnpm install",
"prepare": "husky install",
"turbo": "turbo",
"changeset": "changeset",
"version": "npm run changeset -- version && npm i"
"version": "pnpm run changeset -- version && pnpm i"
},
"devDependencies": {
"@babel/core": "^7.26.0",
Expand Down Expand Up @@ -73,5 +73,8 @@
},
"publishConfig": {
"provenance": true
},
"lint-staged":{
"./**/*.{ts,tsx,js,jsx,vue}": ["eslint --fix --quiet --no-error-on-unmatched-pattern"]
}
}
25 changes: 3 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d9c693

Please sign in to comment.