mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-08-02 16:51:13 +08:00
ci: remove release quality preflight gate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
460a245fb2
commit
3193e741c7
66
.github/workflows/release-desktop.yml
vendored
66
.github/workflows/release-desktop.yml
vendored
@ -19,73 +19,7 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
quality-preflight:
|
|
||||||
name: Quality preflight
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y \
|
|
||||||
build-essential curl wget file \
|
|
||||||
libxdo-dev libssl-dev \
|
|
||||||
libwebkit2gtk-4.1-dev \
|
|
||||||
libayatana-appindicator3-dev \
|
|
||||||
librsvg2-dev patchelf \
|
|
||||||
libfuse2
|
|
||||||
|
|
||||||
- name: Setup Bun
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install root dependencies
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Install desktop dependencies
|
|
||||||
working-directory: desktop
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Install adapter dependencies
|
|
||||||
working-directory: adapters
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Run release quality preflight
|
|
||||||
run: bun run quality:gate --mode pr --skip coverage --artifacts-dir artifacts/quality-runs
|
|
||||||
|
|
||||||
- name: Summarize quality report
|
|
||||||
if: always()
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
latest_report="$(find artifacts/quality-runs -name report.md -print | sort | tail -n 1)"
|
|
||||||
if [ -n "$latest_report" ]; then
|
|
||||||
cat "$latest_report" >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload quality report
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: release-quality-gate
|
|
||||||
path: artifacts/quality-runs/
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: quality-preflight
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
@ -2,15 +2,12 @@ import { describe, expect, test } from 'bun:test'
|
|||||||
import { readFileSync } from 'node:fs'
|
import { readFileSync } from 'node:fs'
|
||||||
|
|
||||||
describe('release desktop workflow', () => {
|
describe('release desktop workflow', () => {
|
||||||
test('runs a quality preflight before packaging matrix builds', () => {
|
test('build job runs directly without quality preflight dependency', () => {
|
||||||
const workflow = readFileSync('.github/workflows/release-desktop.yml', 'utf8')
|
const workflow = readFileSync('.github/workflows/release-desktop.yml', 'utf8')
|
||||||
|
|
||||||
expect(workflow).toContain('quality-preflight:')
|
expect(workflow).not.toContain('quality-preflight:')
|
||||||
expect(workflow).toContain('run: bun run quality:gate --mode pr --skip coverage --artifacts-dir artifacts/quality-runs')
|
expect(workflow).not.toContain('run: bun run quality:gate --mode pr')
|
||||||
expect(workflow).toContain('cat "$latest_report" >> "$GITHUB_STEP_SUMMARY"')
|
expect(workflow).not.toContain('needs: quality-preflight')
|
||||||
expect(workflow).toContain('name: release-quality-gate')
|
expect(workflow).toContain('name: Build (${{ matrix.label }})')
|
||||||
expect(workflow).toContain('path: artifacts/quality-runs/')
|
|
||||||
expect(workflow).toContain('retention-days: 14')
|
|
||||||
expect(workflow).toContain('needs: quality-preflight')
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user