Skip to content

Commit 0ee88f5

Browse files
Merge pull request #1840 from contentstack/staging
DX | 07-04-2025 | Release
2 parents f087e02 + db0f4b2 commit 0ee88f5

File tree

50 files changed

+1593
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1593
-955
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,5 @@ jobs:
304304
id: create_release
305305
env:
306306
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
307-
run: gh release create v${{ steps.publish-core.outputs.version }} --title "Release ${{ steps.publish-core.outputs.version }}" --generate-notes
307+
VERSION: ${{ steps.publish-to-npm.outputs.version }}
308+
run: gh release create v"$VERSION" --title "Release $VERSION" --generate-notes

.github/workflows/unit-test.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
run-tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
19+
- name: Install dependencies for all plugins
20+
run: |
21+
npm run setup-repo-old
22+
23+
- name: Run tests for Audit plugin
24+
working-directory: ./packages/contentstack-audit
25+
run: npm run test:unit
26+
27+
# - name: Fetch latest references
28+
# run: |
29+
# git fetch --prune
30+
31+
# - name: Identify Changed Plugins
32+
# id: changes
33+
# run: |
34+
# echo "Finding changed files..."
35+
# # Ensure both commit references are valid
36+
# if [[ -z "${{ github.event.before }}" || -z "${{ github.sha }}" ]]; then
37+
# echo "Error: Missing commit references"
38+
# exit 1
39+
# fi
40+
41+
# CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
42+
# echo "Changed files:"
43+
# echo "$CHANGED_FILES"
44+
45+
# # Identify affected plugins
46+
# AFFECTED_PLUGINS=$(echo "$CHANGED_FILES" | grep -oP '(?<=^packages/)([^/]+)' | sort -u | tr '\n' ' ')
47+
# echo "Affected plugins: $AFFECTED_PLUGINS"
48+
49+
# # Set output for the next step
50+
# echo "::set-output name=affected_plugins::$AFFECTED_PLUGINS"
51+
52+
# - name: Run Unit Tests for Affected Plugins
53+
# run: |
54+
# for plugin in ${{ steps.changes.outputs.affected_plugins }}; do
55+
# echo "Checking if tests should run for $plugin..."
56+
# if [[ "$plugin" == "contentstack-audit" ]]; then
57+
# echo "Running tests for contentstack-audit..."
58+
# npm run test:unit --prefix ./packages/contentstack-audit
59+
# else
60+
# echo "contentstack-audit has not changed. Skipping tests."
61+
# fi
62+
# done

0 commit comments

Comments
 (0)