Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 11 additions & 79 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,101 +11,33 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.0 # or your local pnpm version

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm' # optional but recommended

- name: Install dependencies for all plugins
run: |
NODE_ENV=PREPACK_MODE npm run setup-repo-old
NODE_ENV=PREPACK_MODE npm run bootstrap

- name: Build all plugins
run: |
NODE_ENV=PREPACK_MODE npm run build

- name: Run tests for Contentstack Command
working-directory: ./packages/contentstack-command
run: npm run test:unit

- name: Run tests for Contentstack Import Plugin
working-directory: ./packages/contentstack-import
run: npm run test:unit

- name: Run tests for Contentstack Export Plugin
working-directory: ./packages/contentstack-export
run: npm run test:unit

- name: Run tests for Audit plugin
working-directory: ./packages/contentstack-audit
run: npm run test:unit

- name: Run tests for Contentstack Config
working-directory: ./packages/contentstack-config
run: npm run test:unit

- name: Run tests for Contentstack Migration
working-directory: ./packages/contentstack-migration
run: npm run test

- name: Run tests for Contentstack Export To CSV
working-directory: ./packages/contentstack-export-to-csv
run: NODE_ENV=PREPACK_MODE npm run test:unit

- name: Run tests for Contentstack Bootstrap
working-directory: ./packages/contentstack-bootstrap
run: npm run test

- name: Run tests for Contentstack Auth
working-directory: ./packages/contentstack-auth
run: NODE_ENV=PREPACK_MODE npm run test

# - name: Run tests for Contentstack Import Setup
# working-directory: ./packages/contentstack-import-setup
# run: npm run test:unit

# TODO: Uncomment this when the tests are fixed
# - name: Run tests for Contentstack Bulk Publish
# working-directory: ./packages/contentstack-bulk-publish
# run: npm run test:unit

- name: Run tests for Contentstack Branches
working-directory: ./packages/contentstack-branches
run: npm run test:unit

- name: Run tests for Contentstack Clone
working-directory: ./packages/contentstack-clone
run: npm run test:unit

# - name: Fetch latest references
# run: |
# git fetch --prune

# - name: Identify Changed Plugins
# id: changes
# run: |
# echo "Finding changed files..."
# # Ensure both commit references are valid
# if [[ -z "${{ github.event.before }}" || -z "${{ github.sha }}" ]]; then
# echo "Error: Missing commit references"
# exit 1
# fi

# CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
# echo "Changed files:"
# echo "$CHANGED_FILES"

# # Identify affected plugins
# AFFECTED_PLUGINS=$(echo "$CHANGED_FILES" | grep -oP '(?<=^packages/)([^/]+)' | sort -u | tr '\n' ' ')
# echo "Affected plugins: $AFFECTED_PLUGINS"

# # Set output for the next step
# echo "::set-output name=affected_plugins::$AFFECTED_PLUGINS"

# - name: Run Unit Tests for Affected Plugins
# run: |
# for plugin in ${{ steps.changes.outputs.affected_plugins }}; do
# echo "Checking if tests should run for $plugin..."
# if [[ "$plugin" == "contentstack-audit" ]]; then
# echo "Running tests for contentstack-audit..."
# npm run test:unit --prefix ./packages/contentstack-audit
# else
# echo "contentstack-audit has not changed. Skipping tests."
# fi
# done
10 changes: 9 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# shamefully-hoist=true
# Use workspace protocol for local development
link-workspace-packages=true
prefer-workspace-packages=true

# Hoist dependencies to root node_modules
shamefully-hoist=true

# Use strict peer dependencies
strict-peer-dependencies=false
13 changes: 6 additions & 7 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

fileignoreconfig:
- filename: package-lock.json
checksum: fa2c81c72305bc19fa4f64457af1000aa2f0c179ecb7e46a5fc9d8b760c705a7
- filename: pnpm-lock.yaml
checksum: faaef9e003c5ba45e56ab1ca24a4fc285f53a2b9ecc6d3dbd11e7130a31db4a2
- filename: packages/contentstack-clone/src/core/util/clone-handler.ts
checksum: 0a7ed55e96aa5a94084538b4a480608593b04c316bf02cf54cdd3a647e9b714c
- filename: package-lock.json
checksum: fa2c81c72305bc19fa4f64457af1000aa2f0c179ecb7e46a5fc9d8b760c705a7
- filename: pnpm-lock.yaml
checksum: df8972e0f20ff41427fedb72d7db639b5c09d5e41a72e065aad6560f9cf24d6a
- filename: packages/contentstack-clone/src/core/util/clone-handler.ts
checksum: 0a7ed55e96aa5a94084538b4a480608593b04c316bf02cf54cdd3a647e9b714c
version: '1.0'
Loading
Loading