|
2753
|
2008
|
15
|
5
|
3297c7711625c00beb0aad652f83c78708a44c42
|
0
|
test
|
1
|
name: AutoDance CI/CD Pipeline
"on":
p name: AutoDance CI/CD Pipeline
"on":
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgresql://testuser:testpassword@localhost:5432/autodance_test"
REDIS_URL: "redis://localhost:6379"
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Pnpm
uses: pnpm/action-setup@v3
with:
version: "8"
- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
shell: bash
- name: Setup pnpm cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ env.STORE_PATH }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install
- name: Database Migration
run: pnpm -r prisma migrate reset --force
- name: Build Shared Packages
run: pnpm -r build --filter ./shared/*
- name: Run TypeScript Tests
run: pnpm -r test --coverage
- name: Setup Python
uses: actions/setup-python@v5
with:
cache: pip
python-version: "3.12"
- name: Run Audio Service Tests
run: |
pip install -r requirements.txt
pip install pytest pytest-asyncio httpx
pytest tests
working-directory: services/audio-service
- name: Run Lyrics Service Tests
run: |
pip install -r requirements.txt
pip install pytest
pytest tests
working-directory: services/lyrics-service
- name: Upload Coverage
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage/
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: autodance_test
POSTGRES_PASSWORD: testpassword
POSTGRES_USER: testuser
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
...
|
test
|
null
|
["ubuntu-latest"]
|
1984
|
2
|
1772435348
|
1772435378
|
1772435346
|
1772435378
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2752
|
2007
|
15
|
5
|
b648dd7be05490cb3a2fc8c3a2fde4616e02f55f
|
0
|
test
|
1
|
name: AutoDance CI/CD Pipeline
"on":
p name: AutoDance CI/CD Pipeline
"on":
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgresql://testuser:testpassword@localhost:5432/autodance_test"
REDIS_URL: "redis://localhost:6379"
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Pnpm
uses: pnpm/action-setup@v3
with:
version: "8"
- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
shell: bash
- name: Setup pnpm cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ${{ env.STORE_PATH }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install
- name: Database Migration
run: pnpm -r prisma migrate reset --force
- name: Build Shared Packages
run: pnpm -r build --filter ./shared/*
- name: Run All Tests
run: pnpm -r test --coverage
- name: Upload Coverage
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage/
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: autodance_test
POSTGRES_PASSWORD: testpassword
POSTGRES_USER: testuser
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
...
|
test
|
null
|
["ubuntu-latest"]
|
1983
|
2
|
1772435142
|
1772435204
|
1772435141
|
1772435204
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2432
|
1687
|
14
|
5
|
6bcd0f0b608c7161cdf8589d556a56257ee178bd
|
0
|
Docker Build Validation
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
docker-build:
name: Docker Build Validation
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Download frontend dist
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: frontend/dist
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build PHP image
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: docker/php/Dockerfile
push: "false"
tags: ops-php:${{ github.sha }}
...
|
docker-build
|
["frontend","backend"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772339824
|
1772340576
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2431
|
1687
|
14
|
5
|
6bcd0f0b608c7161cdf8589d556a56257ee178bd
|
0
|
Backend (PHP + Tests)
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
backend:
name: Backend (PHP + Tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring, pdo_mysql, redis
php-version: "8.2"
- id: composer-cache
name: Get Composer cache directory
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-composer-${{ hashFiles('backend/composer.lock') }}
path: ${{ steps.composer-cache.outputs.dir }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Copy .env
run: |
cp .env.example .env
sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=mysql/' .env
sed -i 's/DB_HOST=127.0.0.1/DB_HOST=127.0.0.1/' .env
sed -i 's/DB_PORT=3306/DB_PORT=3306/' .env
sed -i 's/DB_DATABASE=ops_db/DB_DATABASE=ops_test/' .env
sed -i 's/DB_USERNAME=ops_user/DB_USERNAME=root/' .env
sed -i 's/DB_PASSWORD=/DB_PASSWORD=root/' .env
- name: Generate app key
run: php artisan key:generate
- name: Run migrations
run: php artisan migrate --force
- name: Run tests
run: php artisan test --parallel
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: ops_test
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot" --health-interval=10s --health-timeout=5s --health-retries=5
defaults:
run:
working-directory: backend
...
|
backend
|
null
|
["ubuntu-latest"]
|
1664
|
2
|
1772339864
|
1772340575
|
1772339824
|
1772340575
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2430
|
1687
|
14
|
5
|
6bcd0f0b608c7161cdf8589d556a56257ee178bd
|
0
|
Frontend (TypeScript + Build)
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
frontend:
name: Frontend (TypeScript + Build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: "9"
- uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
node-version: "20"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: TypeScript check
run: pnpm tsc --noEmit
- name: Build
run: pnpm build
- if: github.ref == 'refs/heads/main'
name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: frontend/dist
retention-days: "7"
defaults:
run:
working-directory: frontend
...
|
frontend
|
null
|
["ubuntu-latest"]
|
1663
|
2
|
1772339824
|
1772339864
|
1772339824
|
1772339864
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
16476
|
11711
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
permissions:
actions: read
contents: read
security-events: write
...
|
analyze
|
null
|
["ubuntu-latest"]
|
13769
|
2
|
1775444420
|
1775444445
|
1775444418
|
1775444445
|
|
0
|
|
0
|
Edit
Delete
|
|
12953
|
9535
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
permissions:
actions: read
contents: read
security-events: write
...
|
analyze
|
null
|
["ubuntu-latest"]
|
10950
|
2
|
1774839621
|
1774839661
|
1774839618
|
1774839661
|
|
0
|
|
0
|
Edit
Delete
|
|
9089
|
7322
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
permissions:
actions: read
contents: read
security-events: write
...
|
analyze
|
null
|
["ubuntu-latest"]
|
7856
|
2
|
1774234842
|
1774234854
|
1774234840
|
1774234854
|
|
0
|
|
0
|
Edit
Delete
|
|
8729
|
7229
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
permissions:
actions: read
contents: read
security-events: write
...
|
analyze
|
null
|
["ubuntu-latest"]
|
7538
|
2
|
1774206041
|
1774206127
|
1774206040
|
1774206127
|
|
0
|
|
0
|
Edit
Delete
|
|
6829
|
5908
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
...
|
analyze
|
null
|
["ubuntu-latest"]
|
5915
|
2
|
1773601235
|
1773601637
|
1773601232
|
1773601638
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
4744
|
3887
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
...
|
analyze
|
null
|
["ubuntu-latest"]
|
3882
|
2
|
1772996434
|
1772996471
|
1772996432
|
1772996471
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2605
|
1860
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
...
|
analyze
|
null
|
["ubuntu-latest"]
|
1836
|
2
|
1772391612
|
1772391703
|
1772391612
|
1772391704
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2123
|
1380
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Analyze (java)
|
1
|
name: CodeQL Analysis
"on":
push:
name: CodeQL Analysis
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
schedule:
# 每周一凌晨3点运行
- cron: '0 3 * * 1'
jobs:
analyze:
name: Analyze (java)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: "17"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
timeout-minutes: "30"
strategy:
fail-fast: "false"
matrix:
language:
- java
...
|
analyze
|
null
|
["ubuntu-latest"]
|
1358
|
2
|
1772248309
|
1772249370
|
1772248015
|
1772249370
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2122
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
CI Complete
|
1
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
ci-complete:
name: CI Complete
runs-on: ubuntu-latest
if: always()
steps:
- name: Check Results
run: |
echo "## CI Pipeline Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Stage | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Build | ${{ needs.build.result }} |" >> $GITHUB_STEP_SUMMARY
echo "| Unit Tests | ${{ needs.unit-test.result }} |" >> $GITHUB_STEP_SUMMARY
echo "| UI Tests | ${{ needs.ui-test.result }} |" >> $GITHUB_STEP_SUMMARY
echo "| Security Scan | ${{ needs.security-scan.result }} |" >> $GITHUB_STEP_SUMMARY
- if: ${{ needs.build.result == 'failure' || needs.unit-test.result == 'failure' }}
name: CI Status
run: exit 1
...
|
ci-complete
|
["build","unit-test","ui-test& ["build","unit-test","ui-test","security-scan"]...
|
["ubuntu-latest"]
|
1359
|
2
|
1772249370
|
1772249370
|
1772248014
|
1772249371
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2121
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Security Scan
|
0
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
security-scan:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Build for CodeQL
run: ./gradlew assembleDebug --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:java
timeout-minutes: "20"
...
|
security-scan
|
["build"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772248014
|
1772248310
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2120
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
UI Tests (API ${{ matrix.api-level }}) (30, x86_64 UI Tests (API ${{ matrix.api-level }}) (30, x86_64, google_apis)...
|
0
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
ui-test:
name: UI Tests (API ${{ matrix.api-level }}) (30, x86_64, google_apis)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle Cache
uses: actions/cache@v4
with:
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
restore-keys: |
gradle-${{ runner.os }}-
- id: avd-cache
name: AVD Cache
uses: actions/cache@v4
with:
key: avd-${{ matrix.api-level }}-${{ matrix.target }}
path: |
~/.android/avd/*
~/.android/adb*
- if: steps.avd-cache.outputs.cache-hit != 'true'
name: Create AVD and Generate Snapshot
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
disable-animations: "false"
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: "false"
profile: Nexus 6
script: echo "Generated AVD snapshot for caching."
target: ${{ matrix.target }}
- name: Run Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
disable-animations: "true"
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: "false"
profile: Nexus 6
script: ./gradlew connectedDebugAndroidTest --stacktrace || true
target: ${{ matrix.target }}
- if: always()
name: Upload UI Test Results
uses: actions/upload-artifact@v4
with:
name: ui-test-results-api${{ matrix.api-level }}
path: |
**/build/reports/androidTests/
**/build/outputs/androidTest-results/
retention-days: "14"
timeout-minutes: "45"
strategy:
fail-fast: "false"
matrix:
api-level:
- 30
arch:
- x86_64
target:
- google_apis
...
|
ui-test
|
["build"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772248014
|
1772248310
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2119
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
UI Tests (API ${{ matrix.api-level }}) (26, x86_64 UI Tests (API ${{ matrix.api-level }}) (26, x86_64, default)...
|
0
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
ui-test:
name: UI Tests (API ${{ matrix.api-level }}) (26, x86_64, default)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle Cache
uses: actions/cache@v4
with:
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
restore-keys: |
gradle-${{ runner.os }}-
- id: avd-cache
name: AVD Cache
uses: actions/cache@v4
with:
key: avd-${{ matrix.api-level }}-${{ matrix.target }}
path: |
~/.android/avd/*
~/.android/adb*
- if: steps.avd-cache.outputs.cache-hit != 'true'
name: Create AVD and Generate Snapshot
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
disable-animations: "false"
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: "false"
profile: Nexus 6
script: echo "Generated AVD snapshot for caching."
target: ${{ matrix.target }}
- name: Run Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
disable-animations: "true"
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: "false"
profile: Nexus 6
script: ./gradlew connectedDebugAndroidTest --stacktrace || true
target: ${{ matrix.target }}
- if: always()
name: Upload UI Test Results
uses: actions/upload-artifact@v4
with:
name: ui-test-results-api${{ matrix.api-level }}
path: |
**/build/reports/androidTests/
**/build/outputs/androidTest-results/
retention-days: "14"
timeout-minutes: "45"
strategy:
fail-fast: "false"
matrix:
api-level:
- 26
arch:
- x86_64
target:
- default
...
|
ui-test
|
["build"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772248014
|
1772248310
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2118
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Unit Tests
|
0
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Grant Execute Permission
run: chmod +x ./gradlew
- name: Run Unit Tests
run: ./gradlew testDebugUnitTest --stacktrace
- if: always()
name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: |
**/build/reports/tests/
**/build/test-results/
retention-days: "14"
- if: always()
name: Publish Test Report
uses: mikepenz/action-junit-report@v4
with:
fail_on_failure: "true"
report_paths: '**/build/test-results/**/TEST-*.xml'
require_tests: "false"
- if: always()
name: Test Summary
run: |
echo "## Unit Test Results" >> $GITHUB_STEP_SUMMARY
if [ -f "app/build/test-results/testDebugUnitTest/TEST-*.xml" ]; then
echo "Tests executed successfully" >> $GITHUB_STEP_SUMMARY
fi
timeout-minutes: "20"
...
|
unit-test
|
["build"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772248014
|
1772248310
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2117
|
1379
|
13
|
5
|
6c80c00976d1c5ac4aaa5f76d10cf1e7b4f59448
|
0
|
Build & Lint
|
1
|
name: Android CI
"on":
push:
b name: Android CI
"on":
push:
branches: [develop, master, main]
pull_request:
branches: [develop, master, main]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
JAVA_VERSION: "17"
jobs:
build:
name: Build & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Grant Execute Permission
run: chmod +x ./gradlew
- id: version
name: Extract Version
run: |
VERSION_NAME=$(grep "versionName" app/build.gradle | sed "s/.*\"\(.*\)\".*/\1/")
VERSION_CODE=$(grep "versionCode" app/build.gradle | sed 's/[^0-9]*//g')
echo "name=$VERSION_NAME" >> $GITHUB_OUTPUT
echo "code=$VERSION_CODE" >> $GITHUB_OUTPUT
echo "Version: $VERSION_NAME ($VERSION_CODE)"
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Run Lint
run: ./gradlew lint --stacktrace
continue-on-error: true
- if: always()
name: Upload Lint Results
uses: actions/upload-artifact@v4
with:
name: lint-results
path: |
**/build/reports/lint-results*.html
**/build/reports/lint-results*.xml
retention-days: "14"
- name: Build Debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: |
app/build/outputs/apk/debug/*.apk
printer/build/outputs/apk/debug/*.apk
retention-days: "7"
- name: Build Summary
run: |
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Version**: ${{ steps.version.outputs.name }} (${{ steps.version.outputs.code }})" >> $GITHUB_STEP_SUMMARY
echo "- **Branch**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
timeout-minutes: "30"
outputs:
version_code: ${{ steps.version.outputs.code }}
version_name: ${{ steps.version.outputs.name }}
...
|
build
|
null
|
["ubuntu-latest"]
|
1357
|
2
|
1772248015
|
1772248308
|
1772248014
|
1772248309
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2115
|
1377
|
11
|
5
|
01f709c72d84bbcd3e98adfb6cdb8eacabf9607a
|
0
|
Build iOS
|
0
|
name: Flutter Test
"on":
push:
name: Flutter Test
"on":
push:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
- '.github/workflows/test.yml'
pull_request:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
jobs:
build-ios:
name: Build iOS
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: "true"
channel: stable
flutter-version: 3.19.0
- name: Get dependencies
run: flutter pub get
- name: Build iOS (no codesign)
run: flutter build ios --debug --no-codesign
- name: Upload iOS build
uses: actions/upload-artifact@v4
with:
name: ios-build
path: build/ios/iphoneos/
...
|
build-ios
|
["test"]
|
["macos-latest"]
|
0
|
4
|
0
|
0
|
1772247728
|
1772247827
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2114
|
1377
|
11
|
5
|
01f709c72d84bbcd3e98adfb6cdb8eacabf9607a
|
0
|
Build Android
|
0
|
name: Flutter Test
"on":
push:
name: Flutter Test
"on":
push:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
- '.github/workflows/test.yml'
pull_request:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
jobs:
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: "true"
channel: stable
flutter-version: 3.19.0
- name: Get dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --debug
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: build/app/outputs/flutter-apk/app-debug.apk
...
|
build-android
|
["test"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772247728
|
1772247827
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
2113
|
1377
|
11
|
5
|
01f709c72d84bbcd3e98adfb6cdb8eacabf9607a
|
0
|
Run Tests
|
1
|
name: Flutter Test
"on":
push:
name: Flutter Test
"on":
push:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
- '.github/workflows/test.yml'
pull_request:
branches: [main, develop]
paths:
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: "true"
channel: stable
flutter-version: 3.19.0
- name: Get dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed lib/
- name: Analyze project source
run: flutter analyze --no-fatal-infos
- name: Run tests with coverage
run: flutter test --coverage --reporter expanded
- name: Check coverage threshold
run: "# 计算覆盖率\nCOVERAGE=$(awk '\n /^DA:/ {\n split($0, a, \",\");\n if (a[2] > 0) covered++;\n total++\n }\n END { printf \"%.2f\", (covered/total)*100 }\n' coverage/lcov.info)\n\necho \"\U0001F4CA 当前测试覆盖率: ${COVERAGE}%\"\n\n# 设置最低覆盖率门槛 (当前设为 10%,逐步提高)\nMIN_COVERAGE=10\n\nif (( $(echo \"$COVERAGE < $MIN_COVERAGE\" | bc -l) )); then\n echo \"❌ 覆盖率 ${COVERAGE}% 低于最低要求 ${MIN_COVERAGE}%\"\n exit 1\nelse\n echo \"✅ 覆盖率检查通过\"\nfi\n"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: "false"
file: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate coverage badge
run: |
COVERAGE=$(awk '
/^DA:/ {
split($0, a, ",");
if (a[2] > 0) covered++;
total++
}
END { printf "%.0f", (covered/total)*100 }
' coverage/lcov.info)
echo "COVERAGE_PCT=${COVERAGE}" >> $GITHUB_ENV
...
|
test
|
null
|
["ubuntu-latest"]
|
1355
|
2
|
1772247730
|
1772247826
|
1772247728
|
1772247827
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1830
|
1142
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Macrobenchmark
|
1
|
name: Performance Regression Check
"on":
name: Performance Regression Check
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
benchmark:
name: Macrobenchmark
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build Benchmark APK
run: ./gradlew :app:assembleBenchmark
- name: Run Benchmarks on Emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: "33"
arch: x86_64
disable-animations: "true"
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
force-avd-creation: "false"
script: ./gradlew :app:connectedBenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.haizhan.ime.benchmark.PerformanceBenchmarkTest
target: google_apis
- name: Parse and Compare Results
run: node scripts/ci/check-performance-regression.js
- if: always()
name: Upload Results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: build/outputs/benchmark/
...
|
benchmark
|
null
|
["ubuntu-latest"]
|
1147
|
2
|
1772189679
|
1772189721
|
1772178609
|
1772189721
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1829
|
1141
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
iOS Build
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
build:
name: iOS Build
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Build iOS Targets
run: |
xcodebuild build \
-project ios_keyboard/HaizhanKeyboardApp/HaizhanKeyboard.xcodeproj \
-scheme HaizhanKeyboardApp \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 15'
- if: always()
name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ios-build
path: ios_keyboard/HaizhanKeyboardApp/build
...
|
build
|
["test"]
|
["macos-14"]
|
0
|
3
|
0
|
1772284752
|
1772178609
|
1772284752
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1828
|
1141
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
iOS Target Validation
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
test:
name: iOS Target Validation
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Run iOS Tests
run: |
xcodebuild test \
-project ios_keyboard/HaizhanKeyboardApp/HaizhanKeyboard.xcodeproj \
-scheme HaizhanKeyboardApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-resultBundlePath ios_keyboard/HaizhanKeyboardApp/TestResults.xcresult
- if: always()
name: Upload test results
uses: actions/upload-artifact@v4
with:
name: ios-test-results
path: ios_keyboard/HaizhanKeyboardApp/TestResults.xcresult
...
|
test
|
["lint"]
|
["macos-14"]
|
0
|
3
|
0
|
1772284752
|
1772178609
|
1772284752
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1827
|
1141
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
iOS Lint
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
lint:
name: iOS Lint
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Install SwiftLint
run: brew install swiftlint
- name: Install SwiftFormat
run: brew install swiftformat
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
working-directory: ios_keyboard/HaizhanKeyboardApp
- name: Run SwiftFormat Lint
run: swiftformat --lint .
working-directory: ios_keyboard/HaizhanKeyboardApp
...
|
lint
|
null
|
["macos-14"]
|
0
|
3
|
0
|
1772284752
|
1772178609
|
1772284752
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1826
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
CI Summary
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
ci-summary:
name: CI Summary
runs-on: ubuntu-latest
if: always()
steps:
- name: Check all jobs
run: |
echo "## CI Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Admin Web E2E | ${{ needs.admin-web-e2e.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Flutter Tests | ${{ needs.flutter-test.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| API Gateway | ${{ needs.backend-api-gateway.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| AI Service | ${{ needs.backend-ai-service.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| OCR Service | ${{ needs.backend-ocr-service.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
- if: ${{ contains(needs.*.result, 'failure') }}
name: Fail if any job failed
run: exit 1
...
|
ci-summary
|
["admin-web-e2e","flutter-test", ["admin-web-e2e","flutter-test","backend-api-gateway","backend-ai-service","backend-ocr-service"]...
|
["ubuntu-latest"]
|
1148
|
1
|
1772189721
|
1772189722
|
1772178609
|
1772189722
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1825
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
OCR Service Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-ocr-service:
name: OCR Service Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test -- --coverage
env:
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ocr-service-coverage
path: server/ocr-service/coverage/
retention-days: "7"
defaults:
run:
working-directory: server/ocr-service
...
|
backend-ocr-service
|
null
|
["ubuntu-latest"]
|
1146
|
2
|
1772189609
|
1772189679
|
1772178609
|
1772189679
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1824
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
AI Service Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-ai-service:
name: AI Service Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test -- --coverage
env:
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ai-service-coverage
path: server/ai-service/coverage/
retention-days: "7"
defaults:
run:
working-directory: server/ai-service
...
|
backend-ai-service
|
null
|
["ubuntu-latest"]
|
1145
|
2
|
1772189503
|
1772189608
|
1772178609
|
1772189609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1823
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
API Gateway Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-api-gateway:
name: API Gateway Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check mobile compatibility contracts
run: pnpm run check:mobile-compat
- name: Generate Prisma client
run: pnpm exec prisma generate
- name: Run database migrations
run: pnpm exec prisma migrate deploy
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
- name: Build API Gateway
run: pnpm run build
- name: Start API Gateway for smoke test
run: |
nohup pnpm run start:prod >/tmp/api-gateway-smoke.log 2>&1 &
echo $! >/tmp/api-gateway-smoke.pid
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
REDIS_URL: redis://localhost:6379
JWT_SECRET: test-jwt-secret
NODE_ENV: development
PORT: 3000
- name: Wait for API Gateway readiness
run: |
for i in {1..60}; do
if curl -fsS "http://localhost:3000/api/v1/version/check?platform=android¤t=1.0.0" >/dev/null; then
echo "API Gateway is ready"
exit 0
fi
sleep 2
done
echo "API Gateway failed to become ready"
tail -n 200 /tmp/api-gateway-smoke.log || true
exit 1
- name: Run mobile API smoke tests
run: pnpm run smoke:mobile-api
env:
MOBILE_SMOKE_BASE_URL: http://localhost:3000/api/v1
MOBILE_SMOKE_PHONE: 13800000000
MOBILE_SMOKE_CODE: 000000
MOBILE_SMOKE_DEVICE_ID: ci-smoke-device
MOBILE_SMOKE_TENANT_ID: default_tenant
- if: always()
name: Stop API Gateway smoke process
run: |
if [ -f /tmp/api-gateway-smoke.pid ]; then
kill "$(cat /tmp/api-gateway-smoke.pid)" >/dev/null 2>&1 || true
fi
- if: failure()
name: Show API Gateway smoke logs on failure
run: tail -n 300 /tmp/api-gateway-smoke.log || true
- name: Run unit tests
run: pnpm test -- --coverage
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
REDIS_URL: redis://localhost:6379
JWT_SECRET: test-jwt-secret
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: api-gateway-coverage
path: server/api-gateway/coverage/
retention-days: "7"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: haizhan_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
defaults:
run:
working-directory: server/api-gateway
...
|
backend-api-gateway
|
null
|
["ubuntu-latest"]
|
1144
|
2
|
1772189433
|
1772189503
|
1772178609
|
1772189503
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1822
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Flutter Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
flutter-test:
name: Flutter Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: "true"
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Get dependencies
run: flutter pub get
- name: Analyze code
run: flutter analyze --no-fatal-infos
- name: Run tests
run: flutter test --coverage
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: flutter-coverage
path: flutter_app/coverage/
retention-days: "7"
defaults:
run:
working-directory: flutter_app
...
|
flutter-test
|
null
|
["ubuntu-latest"]
|
1143
|
2
|
1772189403
|
1772189433
|
1772178609
|
1772189433
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1821
|
1140
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Admin Web E2E Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
admin-web-e2e:
name: Admin Web E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run lint
run: pnpm run lint
- name: Run type-check
run: pnpm run type-check
- name: Run build
run: pnpm run build
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E tests
run: pnpm test:e2e
env:
CI: true
- if: always()
name: Upload Playwright report
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: admin-web/playwright-report/
retention-days: "7"
- if: always()
name: Upload test results
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: admin-web/test-results/
retention-days: "7"
defaults:
run:
working-directory: admin-web
...
|
admin-web-e2e
|
null
|
["ubuntu-latest"]
|
1142
|
2
|
1772189123
|
1772189402
|
1772178609
|
1772189402
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1820
|
1139
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Instrumented Tests
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
instrumented-test:
name: Instrumented Tests
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: "30"
arch: x86_64
profile: Nexus 6
script: ./gradlew connectedAndroidTest
- if: always()
name: Upload Instrumented Test Reports
uses: actions/upload-artifact@v4
with:
name: instrumented-test-reports
path: '**/build/reports/androidTests/'
retention-days: "7"
...
|
instrumented-test
|
["build-debug"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772178608
|
1772189124
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1819
|
1139
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Build Debug
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
build-debug:
name: Build Debug
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build Debug APK
run: ./gradlew :app:assembleDebug
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: app/build/outputs/apk/debug/*.apk
retention-days: "14"
...
|
build-debug
|
["lint","unit-test"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772178608
|
1772189124
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1818
|
1139
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Unit Tests
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Run Unit Tests
run: ./gradlew test --continue
- if: always()
name: Upload Test Reports
uses: actions/upload-artifact@v4
with:
name: unit-test-reports
path: '**/build/reports/tests/'
retention-days: "7"
- if: always()
name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: '**/build/test-results/'
retention-days: "7"
...
|
unit-test
|
null
|
["ubuntu-latest"]
|
1141
|
2
|
1772189077
|
1772189123
|
1772178608
|
1772189123
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1817
|
1139
|
9
|
5
|
22125e0f1e435efabf81ec0007a1b56996cb0776
|
0
|
Code Quality
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Run ktlint
run: ./gradlew ktlintCheck --continue
- name: Run detekt
run: ./gradlew detekt --continue
- name: Run Android Lint
run: ./gradlew lint --continue
- if: always()
name: Upload Lint Reports
uses: actions/upload-artifact@v4
with:
name: lint-reports
path: |
**/build/reports/ktlint/
**/build/reports/detekt/
**/build/reports/lint-results-*.html
retention-days: "7"
...
|
lint
|
null
|
["ubuntu-latest"]
|
1140
|
2
|
1772178612
|
1772189077
|
1772178608
|
1772189077
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1812
|
1134
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Macrobenchmark
|
1
|
name: Performance Regression Check
"on":
name: Performance Regression Check
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
benchmark:
name: Macrobenchmark
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build Benchmark APK
run: ./gradlew :app:assembleBenchmark
- name: Run Benchmarks on Emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: "33"
arch: x86_64
disable-animations: "true"
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
force-avd-creation: "false"
script: ./gradlew :app:connectedBenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.haizhan.ime.benchmark.PerformanceBenchmarkTest
target: google_apis
- name: Parse and Compare Results
run: node scripts/ci/check-performance-regression.js
- if: always()
name: Upload Results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: build/outputs/benchmark/
...
|
benchmark
|
null
|
["ubuntu-latest"]
|
1138
|
3
|
1772178120
|
1772178609
|
1772177363
|
1772178609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1811
|
1133
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
iOS Build
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
build:
name: iOS Build
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Build iOS Targets
run: |
xcodebuild build \
-project ios_keyboard/HaizhanKeyboardApp/HaizhanKeyboard.xcodeproj \
-scheme HaizhanKeyboardApp \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 15'
- if: always()
name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ios-build
path: ios_keyboard/HaizhanKeyboardApp/build
...
|
build
|
["test"]
|
["macos-14"]
|
0
|
3
|
0
|
1772178609
|
1772177363
|
1772178609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1810
|
1133
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
iOS Target Validation
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
test:
name: iOS Target Validation
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Run iOS Tests
run: |
xcodebuild test \
-project ios_keyboard/HaizhanKeyboardApp/HaizhanKeyboard.xcodeproj \
-scheme HaizhanKeyboardApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-resultBundlePath ios_keyboard/HaizhanKeyboardApp/TestResults.xcresult
- if: always()
name: Upload test results
uses: actions/upload-artifact@v4
with:
name: ios-test-results
path: ios_keyboard/HaizhanKeyboardApp/TestResults.xcresult
...
|
test
|
["lint"]
|
["macos-14"]
|
0
|
3
|
0
|
1772178609
|
1772177363
|
1772178609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1809
|
1133
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
iOS Lint
|
0
|
name: iOS CI
"on":
push:
branc name: iOS CI
"on":
push:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
- '.github/workflows/ios-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'ios_keyboard/**'
- 'shared/**'
env:
XCODE_VERSION: "15.2"
jobs:
lint:
name: iOS Lint
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: |
TARGET_XCODE="/Applications/Xcode_${{ env.XCODE_VERSION }}.app"
if [ -d "$TARGET_XCODE" ]; then
sudo xcode-select -s "$TARGET_XCODE"
else
echo "Xcode version $TARGET_XCODE not found, use default xcode-select target."
fi
- name: Install SwiftLint
run: brew install swiftlint
- name: Install SwiftFormat
run: brew install swiftformat
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
working-directory: ios_keyboard/HaizhanKeyboardApp
- name: Run SwiftFormat Lint
run: swiftformat --lint .
working-directory: ios_keyboard/HaizhanKeyboardApp
...
|
lint
|
null
|
["macos-14"]
|
0
|
3
|
0
|
1772178609
|
1772177363
|
1772178609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1808
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
CI Summary
|
0
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
ci-summary:
name: CI Summary
runs-on: ubuntu-latest
if: always()
steps:
- name: Check all jobs
run: |
echo "## CI Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Admin Web E2E | ${{ needs.admin-web-e2e.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Flutter Tests | ${{ needs.flutter-test.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| API Gateway | ${{ needs.backend-api-gateway.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| AI Service | ${{ needs.backend-ai-service.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
echo "| OCR Service | ${{ needs.backend-ocr-service.result == 'success' && '✅' || '❌' }} |" >> $GITHUB_STEP_SUMMARY
- if: ${{ contains(needs.*.result, 'failure') }}
name: Fail if any job failed
run: exit 1
...
|
ci-summary
|
["admin-web-e2e","flutter-test", ["admin-web-e2e","flutter-test","backend-api-gateway","backend-ai-service","backend-ocr-service"]...
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1772178609
|
1772177363
|
1772178609
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1807
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
OCR Service Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-ocr-service:
name: OCR Service Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test -- --coverage
env:
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ocr-service-coverage
path: server/ocr-service/coverage/
retention-days: "7"
defaults:
run:
working-directory: server/ocr-service
...
|
backend-ocr-service
|
null
|
["ubuntu-latest"]
|
1137
|
2
|
1772177985
|
1772178119
|
1772177363
|
1772178120
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1806
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
AI Service Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-ai-service:
name: AI Service Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test -- --coverage
env:
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ai-service-coverage
path: server/ai-service/coverage/
retention-days: "7"
defaults:
run:
working-directory: server/ai-service
...
|
backend-ai-service
|
null
|
["ubuntu-latest"]
|
1136
|
2
|
1772177955
|
1772177985
|
1772177363
|
1772177985
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1805
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
API Gateway Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
backend-api-gateway:
name: API Gateway Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check mobile compatibility contracts
run: pnpm run check:mobile-compat
- name: Generate Prisma client
run: pnpm exec prisma generate
- name: Run database migrations
run: pnpm exec prisma migrate deploy
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
- name: Build API Gateway
run: pnpm run build
- name: Start API Gateway for smoke test
run: |
nohup pnpm run start:prod >/tmp/api-gateway-smoke.log 2>&1 &
echo $! >/tmp/api-gateway-smoke.pid
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
REDIS_URL: redis://localhost:6379
JWT_SECRET: test-jwt-secret
NODE_ENV: development
PORT: 3000
- name: Wait for API Gateway readiness
run: |
for i in {1..60}; do
if curl -fsS "http://localhost:3000/api/v1/version/check?platform=android¤t=1.0.0" >/dev/null; then
echo "API Gateway is ready"
exit 0
fi
sleep 2
done
echo "API Gateway failed to become ready"
tail -n 200 /tmp/api-gateway-smoke.log || true
exit 1
- name: Run mobile API smoke tests
run: pnpm run smoke:mobile-api
env:
MOBILE_SMOKE_BASE_URL: http://localhost:3000/api/v1
MOBILE_SMOKE_PHONE: 13800000000
MOBILE_SMOKE_CODE: 000000
MOBILE_SMOKE_DEVICE_ID: ci-smoke-device
MOBILE_SMOKE_TENANT_ID: default_tenant
- if: always()
name: Stop API Gateway smoke process
run: |
if [ -f /tmp/api-gateway-smoke.pid ]; then
kill "$(cat /tmp/api-gateway-smoke.pid)" >/dev/null 2>&1 || true
fi
- if: failure()
name: Show API Gateway smoke logs on failure
run: tail -n 300 /tmp/api-gateway-smoke.log || true
- name: Run unit tests
run: pnpm test -- --coverage
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/haizhan_test
REDIS_URL: redis://localhost:6379
JWT_SECRET: test-jwt-secret
NODE_ENV: test
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: api-gateway-coverage
path: server/api-gateway/coverage/
retention-days: "7"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: haizhan_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
defaults:
run:
working-directory: server/api-gateway
...
|
backend-api-gateway
|
null
|
["ubuntu-latest"]
|
1135
|
2
|
1772177924
|
1772177954
|
1772177363
|
1772177954
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1804
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Flutter Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
flutter-test:
name: Flutter Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: "true"
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Get dependencies
run: flutter pub get
- name: Analyze code
run: flutter analyze --no-fatal-infos
- name: Run tests
run: flutter test --coverage
- if: always()
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: flutter-coverage
path: flutter_app/coverage/
retention-days: "7"
defaults:
run:
working-directory: flutter_app
...
|
flutter-test
|
null
|
["ubuntu-latest"]
|
1134
|
2
|
1772177894
|
1772177924
|
1772177363
|
1772177924
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1803
|
1132
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Admin Web E2E Tests
|
1
|
name: Frontend & Backend CI
"on":
name: Frontend & Backend CI
"on":
push:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
- '.github/workflows/frontend-backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'admin-web/**'
- 'flutter_app/**'
- 'server/**'
env:
FLUTTER_VERSION: 3.16.0
NODE_VERSION: "20"
jobs:
admin-web-e2e:
name: Admin Web E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run lint
run: pnpm run lint
- name: Run type-check
run: pnpm run type-check
- name: Run build
run: pnpm run build
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E tests
run: pnpm test:e2e
env:
CI: true
- if: always()
name: Upload Playwright report
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: admin-web/playwright-report/
retention-days: "7"
- if: always()
name: Upload test results
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: admin-web/test-results/
retention-days: "7"
defaults:
run:
working-directory: admin-web
...
|
admin-web-e2e
|
null
|
["ubuntu-latest"]
|
1133
|
2
|
1772177727
|
1772177893
|
1772177363
|
1772177893
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1802
|
1131
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Instrumented Tests
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
instrumented-test:
name: Instrumented Tests
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: "30"
arch: x86_64
profile: Nexus 6
script: ./gradlew connectedAndroidTest
- if: always()
name: Upload Instrumented Test Reports
uses: actions/upload-artifact@v4
with:
name: instrumented-test-reports
path: '**/build/reports/androidTests/'
retention-days: "7"
...
|
instrumented-test
|
["build-debug"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772177363
|
1772177727
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1801
|
1131
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Build Debug
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
build-debug:
name: Build Debug
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build Debug APK
run: ./gradlew :app:assembleDebug
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: app/build/outputs/apk/debug/*.apk
retention-days: "14"
...
|
build-debug
|
["lint","unit-test"]
|
["ubuntu-latest"]
|
0
|
4
|
0
|
0
|
1772177363
|
1772177727
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1800
|
1131
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Unit Tests
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Run Unit Tests
run: ./gradlew test --continue
- if: always()
name: Upload Test Reports
uses: actions/upload-artifact@v4
with:
name: unit-test-reports
path: '**/build/reports/tests/'
retention-days: "7"
- if: always()
name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: '**/build/test-results/'
retention-days: "7"
...
|
unit-test
|
null
|
["ubuntu-latest"]
|
1132
|
2
|
1772177696
|
1772177726
|
1772177363
|
1772177727
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
1799
|
1131
|
9
|
5
|
893022bfd17ce1f2e75e75651551cf8ceaacfe45
|
0
|
Code Quality
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: "17"
jobs:
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Run ktlint
run: ./gradlew ktlintCheck --continue
- name: Run detekt
run: ./gradlew detekt --continue
- name: Run Android Lint
run: ./gradlew lint --continue
- if: always()
name: Upload Lint Reports
uses: actions/upload-artifact@v4
with:
name: lint-reports
path: |
**/build/reports/ktlint/
**/build/reports/detekt/
**/build/reports/lint-results-*.html
retention-days: "7"
...
|
lint
|
null
|
["ubuntu-latest"]
|
1131
|
2
|
1772177363
|
1772177696
|
1772177363
|
1772177696
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|