-
Notifications
You must be signed in to change notification settings - Fork 258
70 lines (70 loc) · 2.98 KB
/
Copy pathtest.yml
File metadata and controls
70 lines (70 loc) · 2.98 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
name: Test
on: [push, workflow_dispatch]
env:
SCHEME_NAME: 'EhPanda'
DEVELOPER_DIR: /Applications/Xcode_26.6.app
jobs:
Test:
runs-on: macos-26
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install iOS 26 Platform
uses: nick-fields/retry@v4
with:
retry_on: error
max_attempts: 10
timeout_minutes: 999
command: xcodebuild -downloadPlatform iOS
- name: Verify no app-owned privacy manifest (D-04)
run: |
set -euo pipefail
# D-04: the app adds no PrivacyInfo.xcprivacy. SDK-vendored copies (checked-out
# dependencies, build products) are expected and must not be flagged.
found="$(find . -name PrivacyInfo.xcprivacy \
-not -path './.git/*' \
-not -path '*/.build/*' \
-not -path '*/.swiftpm/*' \
-not -path '*/DerivedData/*' \
-not -path '*/SourcePackages/*' \
-not -path '*/checkouts/*')"
if [[ -n "$found" ]]; then
echo "::error::D-04 violated: app-owned PrivacyInfo.xcprivacy found:"
echo "$found"
exit 1
fi
echo "D-04 holds: no app-owned PrivacyInfo.xcprivacy."
- name: Verify analytics disclosure in every README (D-03)
run: |
set -euo pipefail
# D-03 / T-14-17: the analytics disclosure must exist in all six READMEs.
# Anchors per file: the locale's Analytics heading, the vendor link and the
# privacy-policy link. Losing the section removes all three.
status=0
check() {
local file="$1" heading="$2"
# The READMEs have mixed line endings, so tolerate a trailing CR.
grep -qE "^${heading}"$'\r''?$' "$file" \
|| { echo "::error file=$file::D-03 violated: missing heading '$heading'"; status=1; }
grep -qF 'https://telemetrydeck.com)' "$file" \
|| { echo "::error file=$file::D-03 violated: missing TelemetryDeck vendor link"; status=1; }
grep -qF 'https://telemetrydeck.com/privacy' "$file" \
|| { echo "::error file=$file::D-03 violated: missing privacy-policy link"; status=1; }
}
check README.md '## Analytics'
check READMEs/README.chs.md '## 分析'
check READMEs/README.cht.md '## 分析'
check READMEs/README.de.md '## Analyse'
check READMEs/README.jpn.md '## 分析'
check READMEs/README.ko.md '## 분석'
[[ $status -eq 0 ]] || exit 1
echo "D-03 holds: analytics disclosure present in all six READMEs."
- name: Show Xcode version
run: xcodebuild -version
- name: Run tests
run: xcodebuild clean test
-skipMacroValidation
-skipPackagePluginValidation
-scheme ${{ env.SCHEME_NAME }}
-destination 'platform=iOS Simulator,name=iPhone Air'