-
Notifications
You must be signed in to change notification settings - Fork 5
165 lines (138 loc) · 5.23 KB
/
Copy pathtest.yml
File metadata and controls
165 lines (138 loc) · 5.23 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
# P4: layers, size and final ownership targets block; failure reports are retained.
layer-lint:
name: layer-lint (strict)
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Layer, size, ownership, doc-path and map checks
shell: bash
run: |
mkdir -p lint-reports
python scripts/layers/check_layers.py --layout final --strict --output lint-reports/layers.json
python scripts/refactor/check_doc_paths.py --strict --output lint-reports/doc-paths.json
python scripts/refactor/normalize_includes.py --check --scope src --output lint-reports/includes-src.json
python scripts/refactor/normalize_includes.py --check --scope tests --output lint-reports/includes-tests.json
python scripts/layers/check_file_size.py --strict --output lint-reports/size.json
python scripts/layers/check_ownership.py --strict --final --output lint-reports/ownership.json
python scripts/refactor/validate_map.py --strict --output lint-reports/map.json
- name: Refactor tool self-tests
shell: bash
run: python -m unittest discover -s scripts/refactor/tests -p 'test_*.py'
- name: Upload lint reports
if: always()
uses: actions/upload-artifact@v4
with:
name: layer-lint-reports
path: lint-reports
if-no-files-found: error
macos-installer-tests:
name: macos-installer-tests
runs-on: macos-15
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test native installer and both UI architectures
run: bash tests/scripts/macos_installer_test.sh
- name: Test offline macOS release scripts
run: |
python3 tests/scripts/macos_installer_release_test.py
python3 tests/scripts/macos_portable_package_test.py
bash tests/scripts/macos_release_scripts_test.sh
web-tests:
name: web-tests (linux-x64)
runs-on: ubuntu-22.04
defaults:
run:
working-directory: web
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: '10.32.1'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: Install web dependencies
run: pnpm install --frozen-lockfile
- name: Test channel protocol and npm packaging
working-directory: .
run: node --test assets/channels/whatsapp/protocol.test.mjs tests/scripts/npm_packages_test.mjs
- name: Test web UI
run: pnpm test
- name: Test development launchers and complete release inventory
working-directory: .
run: |
python3 -m unittest discover -s tests/scripts -p 'dev_*test.py'
python3 tests/scripts/verify_release_assets_test.py
python3 tests/scripts/verify_deepin_package_test.py
- name: Build web UI
run: pnpm build
unit-tests:
name: unit-tests (linux-x64)
needs: layer-lint
runs-on: ubuntu-22.04
env:
VCPKG_BINARY_SOURCES: clear;default,readwrite
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build tools
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libwebkit2gtk-4.1-dev
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Test embedded frontend rebuild dependencies
run: python3 tests/scripts/embedded_assets_rebuild_test.py
- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-v2-test-ubuntu-22.04-x64-linux-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'ports/**') }}
restore-keys: |
vcpkg-v2-test-ubuntu-22.04-x64-linux-
- name: Configure
shell: bash
run: |
python3 scripts/refactor/cmake_target_snapshot.py --build-dir build --query
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET=x64-linux \
-DVCPKG_MANIFEST_FEATURES=tests \
-DBUILD_TESTING=ON \
-DACECODE_BUILD_DESKTOP=ON
- name: Verify layer library ownership and link boundaries
run: python3 scripts/refactor/check_layer_libraries.py --build-dir build
- name: Build CLI, desktop and test binary
shell: bash
run: cmake --build build --target acecode acecode-desktop acecode_unit_tests
- name: Validate bundled models.dev registry
shell: bash
run: ./build/acecode --validate-models-registry
- name: Run ctest
shell: bash
run: ctest --test-dir build --output-on-failure