Skip to content

Commit 0f0a88e

Browse files
authored
Merge pull request #1222 from layer5io/copilot/use-meshery-ui-for-testing
[CI] Add Meshery UI integration testing for pull requests
2 parents 408acbc + 92a73e2 commit 0f0a88e

File tree

2 files changed

+115
-0
lines changed

2 files changed

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

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ To run tests:
5454
make tests
5555
```
5656

57+
### Continuous Integration
58+
59+
#### Automated Integration Testing with Meshery UI
60+
61+
Sistent includes automated integration testing in CI to ensure changes don't break downstream applications. When you create a pull request, the CI automatically:
62+
63+
1. **Builds Sistent** with your changes
64+
2. **Tests against Meshery UI** by installing your Sistent build into Meshery UI
65+
3. **Runs Meshery UI's build and tests** to verify compatibility
66+
4. **Reports results** in the PR checks
67+
68+
This ensures that your Sistent changes are validated against real-world usage in Meshery UI before merging. The workflow runs automatically on all pull requests, providing fast feedback on integration issues.
69+
5770
### Using your local Sistent Fork in a Project
5871

5972
#### Method 1: Manual Installation

0 commit comments

Comments
 (0)