From a23cede159f2a1b6a01f766d6086bfeb6d26a206 Mon Sep 17 00:00:00 2001 From: Rajesh-Nagarajan-11 Date: Sat, 18 Apr 2026 11:17:47 +0530 Subject: [PATCH] feat: add Meshery UI integration test for mui-datatables Signed-off-by: Rajesh-Nagarajan-11 --- .../workflows/test-meshery-integration.yml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/test-meshery-integration.yml diff --git a/.github/workflows/test-meshery-integration.yml b/.github/workflows/test-meshery-integration.yml new file mode 100644 index 0000000..3d5094d --- /dev/null +++ b/.github/workflows/test-meshery-integration.yml @@ -0,0 +1,101 @@ +name: Test mui-datatables with Meshery UI + +on: + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: + - '*.md' + +jobs: + test-with-meshery-ui: + name: Integration Test with Meshery UI + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout mui-datatables PR + uses: actions/checkout@v6 + with: + path: mui-datatables + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: mui-datatables/package-lock.json + + - name: Install mui-datatables Dependencies + working-directory: mui-datatables + run: npm install + + - name: Build mui-datatables + working-directory: mui-datatables + run: npm run build + + - name: Pack mui-datatables for Installation + working-directory: mui-datatables + run: | + npm pack + MUI_DATATABLES_PACKAGE=$(ls sistent-mui-datatables-*.tgz 2>/dev/null | \ + head -n 1) + if [ -z "$MUI_DATATABLES_PACKAGE" ]; then + echo "Error: No mui-datatables package found" + exit 1 + fi + echo "MUI_DATATABLES_PACKAGE=$MUI_DATATABLES_PACKAGE" >> $GITHUB_ENV + echo "Created package: $MUI_DATATABLES_PACKAGE" + + - name: Checkout Meshery UI + uses: actions/checkout@v6 + with: + repository: meshery/meshery + path: meshery + fetch-depth: 1 + + - name: Install Meshery UI Dependencies + working-directory: meshery/ui + run: npm install + + - name: Install mui-datatables from PR + working-directory: meshery/ui + run: npm install ../../mui-datatables/${{ env.MUI_DATATABLES_PACKAGE }} + + - name: Build Meshery UI + working-directory: meshery/ui + run: | + npm run build + continue-on-error: false + + - name: Run Meshery UI Tests + working-directory: meshery/ui + run: | + if grep -qE '"test"\s*:' package.json; then + npm run test -- --passWithNoTests + else + echo "No tests found in Meshery UI, skipping test step" + fi + continue-on-error: false + + - name: Integration Test Summary + if: always() + run: | + { + echo "## Integration Test Results" + echo "" + if [ "${{ job.status }}" == "success" ]; then + echo "✅ mui-datatables changes were successfully tested" + echo " against Meshery UI" + else + echo "❌ Integration test failed" + fi + echo "" + echo "### Details" + echo "- **mui-datatables Package**: ${{ env.MUI_DATATABLES_PACKAGE }}" + if [ "${{ job.status }}" == "success" ]; then + echo "- **Meshery UI Build**: ✅ Successful" + else + echo "- **Meshery UI Build**: ❌ Failed" + fi + echo "- **Node Version**: 20" + } >> $GITHUB_STEP_SUMMARY