Skip to content

Commit bcf3256

Browse files
Copilothotlong
andcommitted
Update GitHub workflows for simplified npm structure
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 70c6aae commit bcf3256

File tree

3 files changed

+31
-92
lines changed

3 files changed

+31
-92
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,54 +25,24 @@ jobs:
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: ${{ matrix.node-version }}
28-
29-
- name: Setup pnpm
30-
uses: pnpm/action-setup@v4
31-
with:
32-
version: 9
33-
34-
- name: Get pnpm store directory
35-
shell: bash
36-
run: |
37-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38-
39-
- name: Setup pnpm cache
40-
uses: actions/cache@v4
41-
with:
42-
path: ${{ env.STORE_PATH }}
43-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44-
restore-keys: |
45-
${{ runner.os }}-pnpm-store-
28+
cache: 'npm'
4629

4730
- name: Install dependencies
48-
run: pnpm install --frozen-lockfile
31+
run: npm ci
4932

5033
- name: Type check
51-
run: pnpm run type-check
52-
53-
- name: Build all packages
54-
run: pnpm run build
55-
56-
- name: Run basic example
57-
run: pnpm run example:basic
58-
59-
- name: Run e-commerce example
60-
run: pnpm run example:ecommerce
61-
62-
- name: Run blog example
63-
run: pnpm run example:blog
34+
run: npm run type-check
6435

65-
- name: Run CRM example
66-
run: pnpm run example:crm
36+
- name: Build
37+
run: npm run build
6738

68-
- name: Run comprehensive CRM example
69-
run: pnpm run example:crm-comprehensive
39+
- name: Run example
40+
run: npm run example
7041

7142
- name: Archive build artifacts
7243
if: matrix.node-version == '20.x'
7344
uses: actions/upload-artifact@v4
7445
with:
7546
name: dist
76-
path: |
77-
packages/*/dist
47+
path: dist/
7848
retention-days: 7

.github/workflows/code-quality.yml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,21 @@ jobs:
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: '20.x'
22-
23-
- name: Setup pnpm
24-
uses: pnpm/action-setup@v4
25-
with:
26-
version: 9
27-
28-
- name: Get pnpm store directory
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
33-
- name: Setup pnpm cache
34-
uses: actions/cache@v4
35-
with:
36-
path: ${{ env.STORE_PATH }}
37-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-pnpm-store-
22+
cache: 'npm'
4023

4124
- name: Install dependencies
42-
run: pnpm install --frozen-lockfile
25+
run: npm ci
26+
27+
- name: Type check
28+
run: npm run type-check
4329

44-
- name: Type check all packages
45-
run: pnpm run type-check
30+
- name: Build
31+
run: npm run build
4632

4733
- name: Check for TypeScript errors
4834
run: |
4935
echo "Checking for TypeScript compilation errors..."
50-
pnpm run build 2>&1 | tee build.log
36+
npm run build 2>&1 | tee build.log
5137
if grep -i "error TS" build.log; then
5238
echo "TypeScript errors found!"
5339
exit 1
@@ -57,15 +43,16 @@ jobs:
5743
- name: Check package structure
5844
run: |
5945
echo "Verifying package structure..."
60-
test -f packages/core/package.json || exit 1
61-
test -f packages/examples/package.json || exit 1
62-
test -d packages/core/src || exit 1
63-
test -d packages/examples/src || exit 1
46+
test -f package.json || exit 1
47+
test -f tsconfig.json || exit 1
48+
test -d src || exit 1
49+
test -f src/objectstack.config.ts || exit 1
50+
test -d src/objects || exit 1
51+
test -d src/views || exit 1
6452
echo "Package structure verified."
6553
66-
- name: Verify examples can run
54+
- name: Verify example can run
6755
run: |
68-
echo "Testing if examples can execute..."
69-
pnpm run build
70-
pnpm run example:basic
71-
echo "Examples verified successfully."
56+
echo "Testing if example can execute..."
57+
npm run example
58+
echo "Example verified successfully."

.github/workflows/release.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,20 @@ jobs:
2323
uses: actions/setup-node@v4
2424
with:
2525
node-version: '20.x'
26-
27-
- name: Setup pnpm
28-
uses: pnpm/action-setup@v4
29-
with:
30-
version: 9
31-
32-
- name: Get pnpm store directory
33-
shell: bash
34-
run: |
35-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36-
37-
- name: Setup pnpm cache
38-
uses: actions/cache@v4
39-
with:
40-
path: ${{ env.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42-
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
26+
cache: 'npm'
4427

4528
- name: Install dependencies
46-
run: pnpm install --frozen-lockfile
29+
run: npm ci
4730

48-
- name: Build all packages
49-
run: pnpm run build
31+
- name: Build
32+
run: npm run build
5033

5134
- name: Create Release
5235
uses: softprops/action-gh-release@v2
5336
with:
5437
generate_release_notes: true
5538
files: |
56-
packages/*/package.json
39+
package.json
5740
README.md
58-
CRM_DOCUMENTATION.md
5941
env:
6042
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)