-
Notifications
You must be signed in to change notification settings - Fork 65
145 lines (124 loc) · 4.18 KB
/
Copy pathci-plugins.yml
File metadata and controls
145 lines (124 loc) · 4.18 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: macOS Plugin CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: macos-plugin-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Classify changes
runs-on: ubuntu-latest
outputs:
plugins: ${{ steps.classify.outputs.plugins }}
steps:
- name: Check out source
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Resolve comparison base
id: base
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BASE_SHA: ${{ github.event.before }}
shell: bash
run: |
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
echo "manual=true" >> "$GITHUB_OUTPUT"
exit 0
fi
base_sha="$PUSH_BASE_SHA"
if [[ "$EVENT_NAME" == "pull_request" ]]; then
base_sha="$PR_BASE_SHA"
fi
{
echo "manual=false"
echo "base_sha=$base_sha"
} >> "$GITHUB_OUTPUT"
- name: Classify changed paths
id: classify
env:
MANUAL: ${{ steps.base.outputs.manual }}
BASE_SHA: ${{ steps.base.outputs.base_sha }}
shell: bash
run: |
if [[ "$MANUAL" == "true" ]]; then
echo "plugins=true" >> "$GITHUB_OUTPUT"
exit 0
fi
./scripts/classify-ci-changes.sh "$BASE_SHA" "$GITHUB_SHA" >> "$GITHUB_OUTPUT"
- name: Summarize selected lanes
shell: bash
env:
PLUGINS: ${{ steps.classify.outputs.plugins }}
run: |
{
echo "### Plugin CI lanes"
echo "| Lane | Run |"
echo "| --- | --- |"
echo "| Plugin tests and package verification | $PLUGINS |"
} >> "$GITHUB_STEP_SUMMARY"
plugin-tests:
name: Plugin tests and package verification
needs: changes
if: needs.changes.outputs.plugins == 'true'
runs-on: macos-14
timeout-minutes: 35
steps:
- name: Check out source
uses: actions/checkout@v7
- name: Set up Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "6.2"
- name: Prepare verified SwiftPM cache
uses: ./.github/actions/prepare-macos-dependency-cache
with:
swiftpm: "true"
- name: Run plugin-focused Swift tests
timeout-minutes: 12
run: ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --report .artifacts/test-stability/macos-plugins.json --suite-timeout-seconds 660 -- --filter '([Pp]lugin|LitheGoSupportModuleTests|LinuxDo)'
- name: Run plugin WebKit lifecycle integration tests
timeout-minutes: 3
run: ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --report .artifacts/test-stability/macos-plugin-webkit.json --max-seconds 60 --suite-timeout-seconds 150 -- --skip-build --filter WebKitIntegrationTests
- name: Build and verify official plugin packages
timeout-minutes: 10
run: ./scripts/verify-official-plugins.sh
- name: Generate combined plugin test report
if: always()
run: node .agents/skills/write-stable-tests/scripts/generate-test-report.mjs
- name: Upload plugin test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-stability-plugins
path: .artifacts/test-stability/
if-no-files-found: ignore
retention-days: 14
gate:
name: Plugin CI gate
needs:
- changes
- plugin-tests
if: always()
runs-on: ubuntu-latest
steps:
- name: Verify required jobs
env:
CHANGES_RESULT: ${{ needs.changes.result }}
PLUGIN_SELECTED: ${{ needs.changes.outputs.plugins }}
PLUGIN_RESULT: ${{ needs.plugin-tests.result }}
shell: bash
run: |
[[ "$CHANGES_RESULT" == "success" ]]
if [[ "$PLUGIN_SELECTED" == "true" ]]; then
[[ "$PLUGIN_RESULT" == "success" ]]
else
[[ "$PLUGIN_RESULT" == "skipped" ]]
fi