mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-08-28 10:16:22 -05:00
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
smoke-and-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Set up Bun
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
bun-version-file: .bun-version
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
cache-dependency-path: python/requirements.txt
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Smoke and full unit test suite
|
|
run: bun run check
|
|
|
|
- name: Install Python test dependencies
|
|
run: python -m pip install -r python/requirements.txt
|
|
|
|
- name: Python unit tests
|
|
run: python -m pytest -q python/tests
|
|
|
|
- name: Suspicious PR intent scan
|
|
env:
|
|
PR_SCAN_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || 'origin/main' }}
|
|
PR_SCAN_HEAD: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'HEAD' }}
|
|
run: bun run security:pr-scan -- --base "$PR_SCAN_BASE" --head "$PR_SCAN_HEAD"
|
|
- name: Provider tests
|
|
run: bun run test:provider
|
|
|
|
- name: Provider recommendation tests
|
|
run: npm run test:provider-recommendation
|
|
|
|
web:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Set up Bun
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
bun-version-file: .bun-version
|
|
|
|
- name: Install web dependencies
|
|
run: bun install --cwd web --frozen-lockfile
|
|
|
|
- name: Typecheck web
|
|
run: bun run --cwd web typecheck
|
|
|
|
- name: Build web
|
|
run: bun run --cwd web build
|