Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hold] chore: test published packages #34

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:

jobs:
build_test:
if: github.event.pull_request.head.ref != 'test-published-packages'
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/test_published_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test Published Packages

on:
push:
branches:
- test-published-packages

jobs:
build_test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
@tidbcloud:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=$PKG_TOKEN
EOF
env:
PKG_TOKEN: ${{ secrets.PKG_TOKEN }}

- name: Install Dependencies
run: pnpm i

- name: Build Playground
run: pnpm build:playground
2 changes: 2 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build.environment]
NPM_CONFIG_USERCONFIG = "./netlify/.npmrc"
2 changes: 2 additions & 0 deletions netlify/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@tidbcloud:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_PKG_TOKEN}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"prepare": "husky",
"dev": "pnpm -r --parallel dev",
"build": "pnpm -r build",
"build:playground": "pnpm --filter @tidbcloud/tisqleditor-playground... run build",
"test": "jest",
"release": "changeset publish"
},
Expand Down
18 changes: 9 additions & 9 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@tanstack/react-query": "^5.45.1",
"@tidbcloud/codemirror-extension-ai-widget": "workspace:^",
"@tidbcloud/codemirror-extension-sql-autocomplete": "workspace:^",
"@tidbcloud/codemirror-extension-cur-sql": "workspace:^",
"@tidbcloud/codemirror-extension-cur-sql-gutter": "workspace:^",
"@tidbcloud/codemirror-extension-linters": "workspace:^",
"@tidbcloud/codemirror-extension-save-helper": "workspace:^",
"@tidbcloud/codemirror-extension-sql-parser": "workspace:^",
"@tidbcloud/codemirror-extension-themes": "workspace:^",
"@tidbcloud/tisqleditor-react": "workspace:^",
"@tidbcloud/codemirror-extension-ai-widget": "^0.0.3",
"@tidbcloud/codemirror-extension-cur-sql": "^0.0.3",
"@tidbcloud/codemirror-extension-cur-sql-gutter": "^0.0.3",
"@tidbcloud/codemirror-extension-linters": "^0.0.3",
"@tidbcloud/codemirror-extension-save-helper": "^0.0.3",
"@tidbcloud/codemirror-extension-sql-autocomplete": "^0.0.3",
"@tidbcloud/codemirror-extension-sql-parser": "^0.0.3",
"@tidbcloud/codemirror-extension-themes": "^0.0.3",
"@tidbcloud/tisqleditor-react": "^0.0.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",
Expand Down
6 changes: 6 additions & 0 deletions packages/playground/replace-pkgs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#!/usr/bin/env bash

pnpm remove @tidbcloud/codemirror-extension-ai-widget @tidbcloud/codemirror-extension-sql-autocomplete @tidbcloud/codemirror-extension-cur-sql @tidbcloud/codemirror-extension-cur-sql-gutter @tidbcloud/codemirror-extension-linters @tidbcloud/codemirror-extension-save-helper @tidbcloud/codemirror-extension-sql-parser @tidbcloud/codemirror-extension-themes @tidbcloud/tisqleditor-react

pnpm add @tidbcloud/codemirror-extension-ai-widget @tidbcloud/codemirror-extension-sql-autocomplete @tidbcloud/codemirror-extension-cur-sql @tidbcloud/codemirror-extension-cur-sql-gutter @tidbcloud/codemirror-extension-linters @tidbcloud/codemirror-extension-save-helper @tidbcloud/codemirror-extension-sql-parser @tidbcloud/codemirror-extension-themes @tidbcloud/tisqleditor-react
221 changes: 203 additions & 18 deletions pnpm-lock.yaml

Large diffs are not rendered by default.