Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4cbad4c
fix: added missing branch flag handling
Mar 23, 2025
f87fa92
fix: mask cs pattern or oauth token masking
aman19K Mar 26, 2025
dee060c
refactor: remove test workflow
aman19K Mar 26, 2025
be91609
added delivery token in sensitiveKeys
aman19K Mar 26, 2025
a49ad5c
lock file updated
aman19K Mar 26, 2025
4027706
Merge pull request #1830 from contentstack/staging
harshithad0703 Mar 26, 2025
897fc4a
Merge pull request #1829 from contentstack/fix/DX-1909
aman19K Mar 26, 2025
60c942b
Feat: Added check to check whether a multiple field is array or not
cs-raj Mar 26, 2025
04fc7e6
Merge branch 'development' into feat/DX-2360
cs-raj Mar 26, 2025
33e8046
path fix
cs-raj Mar 27, 2025
8f01456
Fix: Updated the condition to check for the path validation
cs-raj Mar 27, 2025
40e4d25
Merge pull request #1833 from contentstack/fix/path
cs-raj Mar 27, 2025
4df47d2
fix: removed comments
Mar 27, 2025
b482eef
Updated Rimraf in root
cs-raj Mar 28, 2025
29f85ad
Launch moved to 1.6.0
cs-raj Mar 28, 2025
780b9a5
accepting patch and minor version
cs-raj Mar 28, 2025
c11b0cf
rimraf updated to 5.0.10
cs-raj Mar 28, 2025
f27775f
Merge pull request #1834 from contentstack/fix/DX-2370
cs-raj Mar 28, 2025
1a94a6e
feat: Add workflow to run and validate unit tests
aman19K Apr 1, 2025
89a1c38
added script to run unit testcases in audit plugin
aman19K Apr 1, 2025
3ca9c8f
fix: script
aman19K Apr 1, 2025
7307e84
refactor: remove export-to-csv from workflow
aman19K Apr 1, 2025
f811fbd
Merge branch 'development' into fix/DX-1328
netrajpatel Apr 1, 2025
5fdf6b4
refactor: run unit tests only for affected plugins
aman19K Apr 1, 2025
b547792
fix
aman19K Apr 1, 2025
297a277
test audit trigger
aman19K Apr 1, 2025
7ade683
Merge pull request #1835 from contentstack/feat/DX-2334-add-unit-test…
aman19K Apr 2, 2025
56f19b1
Merge branch 'development' into feat/DX-2360
cs-raj Apr 2, 2025
0940d02
Lock file update
cs-raj Apr 2, 2025
d6d2a5d
workflow update
cs-raj Apr 2, 2025
e2e9f77
unit test case workflow fix
cs-raj Apr 2, 2025
dd8ad24
Merge pull request #1831 from contentstack/feat/DX-2360
cs-raj Apr 2, 2025
3e2611f
Refactor unit test workflow to simplify plugin testing and remove unu…
harshithad0703 Apr 2, 2025
f6cf555
Merge pull request #1839 from contentstack/fix/unit-workflow
harshithad0703 Apr 2, 2025
999db3e
Merge branch 'development' into fix/DX-1328
harshithad0703 Apr 2, 2025
649544b
Merge pull request #1827 from contentstack/fix/DX-1328
harshithad0703 Apr 2, 2025
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
62 changes: 62 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Run Unit Tests

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Install dependencies for all plugins
run: |
npm run setup-repo-old

- name: Run tests for Audit plugin
working-directory: ./packages/contentstack-audit
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
Loading
Loading