Skip to content

Commit cd2c3e8

Browse files
authored
Merge pull request #49 from Rajesh-Nagarajan-11/master
feat: add Meshery UI integration test for mui-datatables
2 parents effa4c7 + a23cede commit cd2c3e8

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Test mui-datatables with Meshery UI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths-ignore:
7+
- '*.md'
8+
9+
jobs:
10+
test-with-meshery-ui:
11+
name: Integration Test with Meshery UI
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- name: Checkout mui-datatables PR
17+
uses: actions/checkout@v6
18+
with:
19+
path: mui-datatables
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v6
23+
with:
24+
node-version: '20'
25+
cache: 'npm'
26+
cache-dependency-path: mui-datatables/package-lock.json
27+
28+
- name: Install mui-datatables Dependencies
29+
working-directory: mui-datatables
30+
run: npm install
31+
32+
- name: Build mui-datatables
33+
working-directory: mui-datatables
34+
run: npm run build
35+
36+
- name: Pack mui-datatables for Installation
37+
working-directory: mui-datatables
38+
run: |
39+
npm pack
40+
MUI_DATATABLES_PACKAGE=$(ls sistent-mui-datatables-*.tgz 2>/dev/null | \
41+
head -n 1)
42+
if [ -z "$MUI_DATATABLES_PACKAGE" ]; then
43+
echo "Error: No mui-datatables package found"
44+
exit 1
45+
fi
46+
echo "MUI_DATATABLES_PACKAGE=$MUI_DATATABLES_PACKAGE" >> $GITHUB_ENV
47+
echo "Created package: $MUI_DATATABLES_PACKAGE"
48+
49+
- name: Checkout Meshery UI
50+
uses: actions/checkout@v6
51+
with:
52+
repository: meshery/meshery
53+
path: meshery
54+
fetch-depth: 1
55+
56+
- name: Install Meshery UI Dependencies
57+
working-directory: meshery/ui
58+
run: npm install
59+
60+
- name: Install mui-datatables from PR
61+
working-directory: meshery/ui
62+
run: npm install ../../mui-datatables/${{ env.MUI_DATATABLES_PACKAGE }}
63+
64+
- name: Build Meshery UI
65+
working-directory: meshery/ui
66+
run: |
67+
npm run build
68+
continue-on-error: false
69+
70+
- name: Run Meshery UI Tests
71+
working-directory: meshery/ui
72+
run: |
73+
if grep -qE '"test"\s*:' package.json; then
74+
npm run test -- --passWithNoTests
75+
else
76+
echo "No tests found in Meshery UI, skipping test step"
77+
fi
78+
continue-on-error: false
79+
80+
- name: Integration Test Summary
81+
if: always()
82+
run: |
83+
{
84+
echo "## Integration Test Results"
85+
echo ""
86+
if [ "${{ job.status }}" == "success" ]; then
87+
echo "✅ mui-datatables changes were successfully tested"
88+
echo " against Meshery UI"
89+
else
90+
echo "❌ Integration test failed"
91+
fi
92+
echo ""
93+
echo "### Details"
94+
echo "- **mui-datatables Package**: ${{ env.MUI_DATATABLES_PACKAGE }}"
95+
if [ "${{ job.status }}" == "success" ]; then
96+
echo "- **Meshery UI Build**: ✅ Successful"
97+
else
98+
echo "- **Meshery UI Build**: ❌ Failed"
99+
fi
100+
echo "- **Node Version**: 20"
101+
} >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)