Skip to content

Commit fb1a7a0

Browse files
committed
ci(workflows): update permissions and simplify test steps
Add explicit permissions to release workflows and simplify integration test execution by removing category-based branching. Also remove redundant build step in kmp-test workflow.
1 parent a745903 commit fb1a7a0

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

.github/workflows/compose-release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
build-android:
1919
name: Build Android APK
2020
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
2125
steps:
2226
- name: Checkout code
2327
uses: actions/checkout@v4
@@ -66,6 +70,9 @@ jobs:
6670
build-desktop:
6771
name: Build Desktop (${{ matrix.os }})
6872
runs-on: ${{ matrix.os }}
73+
permissions:
74+
contents: write
75+
pull-requests: write
6976
strategy:
7077
matrix:
7178
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -114,12 +121,15 @@ jobs:
114121
with:
115122
name: ${{ matrix.artifact }}
116123
path: ${{ matrix.path }}
117-
118124
# Create release with all artifacts
119125
create-release:
120126
name: Create Release
121127
needs: [build-android, build-desktop]
122128
runs-on: ubuntu-latest
129+
permissions:
130+
contents: write
131+
pull-requests: write
132+
123133
# Only run for compose-* tags to avoid conflicts with main release workflow
124134
if: startsWith(github.ref, 'refs/tags/compose-')
125135
steps:

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -153,29 +153,7 @@ jobs:
153153
echo "Keep Test Projects: ${KEEP_TEST_PROJECTS}"
154154
echo ""
155155
156-
# 运行对应的测试类别
157-
if [ "${{ matrix.test-category }}" = "all" ]; then
158-
echo "Running all integration tests v2..."
159-
npm run test:integration-v2
160-
elif [ "${{ matrix.test-category }}" = "simple" ]; then
161-
echo "Running simple robustness tests..."
162-
npm run test:integration-v2:simple
163-
elif [ "${{ matrix.test-category }}" = "business" ]; then
164-
echo "Running business scenario tests..."
165-
npm run test:integration-v2:business
166-
elif [ "${{ matrix.test-category }}" = "errors" ]; then
167-
echo "Running error recovery tests..."
168-
npm run test:integration-v2:errors
169-
elif [ "${{ matrix.test-category }}" = "performance" ]; then
170-
echo "Running performance tests..."
171-
npm run test:integration-v2:performance
172-
elif [ "${{ matrix.test-category }}" = "custom" ]; then
173-
echo "Running custom scenario tests..."
174-
npm run test:integration-v2:custom
175-
else
176-
echo "Unknown test category: ${{ matrix.test-category }}"
177-
exit 1
178-
fi
156+
npm run test:integration-v2
179157
timeout-minutes: 45
180158

181159
- name: Analyze test results and check threshold

.github/workflows/kmp-test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ jobs:
7575
- name: Clean mpp-core
7676
run: ./gradlew :mpp-core:clean
7777

78-
# Build mpp-core for all targets (JVM, JS, Android)
79-
- name: Build mpp-core
80-
run: ./gradlew :mpp-core:assemble --no-daemon
81-
8278
# Test mpp-core for all targets
8379
- name: Test mpp-core
8480
run: ./gradlew :mpp-core:allTests

0 commit comments

Comments
 (0)