-
Notifications
You must be signed in to change notification settings - Fork 191
106 lines (94 loc) · 3.13 KB
/
test-meshery-integration.yml
File metadata and controls
106 lines (94 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Test Sistent with Meshery UI
on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'system/**/*'
- '*.md'
jobs:
test-with-meshery-ui:
name: Integration Test with Meshery UI
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Sistent PR
uses: actions/checkout@v6
with:
path: sistent
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: sistent/package-lock.json
- name: Install Sistent Dependencies
working-directory: sistent
run: npm install
- name: Build Sistent
working-directory: sistent
run: npm run build
- name: Pack Sistent for Installation
working-directory: sistent
run: |
npm pack
SISTENT_PACKAGE=$(ls sistent-sistent-*.tgz 2>/dev/null | \
head -n 1)
if [ -z "$SISTENT_PACKAGE" ]; then
echo "Error: No Sistent package found"
exit 1
fi
echo "SISTENT_PACKAGE=$SISTENT_PACKAGE" >> $GITHUB_ENV
echo "Created package: $SISTENT_PACKAGE"
- name: Checkout Meshery UI
uses: actions/checkout@v6
with:
repository: meshery/meshery
# Pin to last known-good commit before the @mui/x-tree-view v8 upgrade
# that broke the TreeView import (meshery/meshery#18163).
# Remove this pin once meshery/meshery#18167 is merged.
ref: 7c3d02c91365dc776b11ffc50aab277026e86701
path: meshery
fetch-depth: 1
- name: Install Meshery UI Dependencies
working-directory: meshery/ui
run: npm install
- name: Install Sistent from PR
working-directory: meshery/ui
run: npm install ../../sistent/${{ env.SISTENT_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 "✅ Sistent changes were successfully tested"
echo " against Meshery UI"
else
echo "❌ Integration test failed"
fi
echo ""
echo "### Details"
echo "- **Sistent Package**: ${{ env.SISTENT_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