Skip to content

Pre Checkin

Pre Checkin #47

Workflow file for this run

name: Pre Checkin
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [main] # Triggers on PRs targeting `main`
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
workflow_dispatch:
schedule:
- cron: '0 22 * * *' # 6:00 AM Beijing Time (UTC+8)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
black:
name: Check Code Style with Black
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Describe Pre Checkin scope
run: |
echo "Pre Checkin is the shared gate for lightweight validation before GPU CI starts."
echo "Future fast, non-GPU checks can be added here so Native and OOT reuse one result."
- name: Run Black
uses: psf/black@stable
ruff:
name: Check Code Style with Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python environment
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: pip3 install ruff
- name: Install reviewdog
uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893
- name: Run ruff with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ruff check . \
--output-format=rdjson \
--exit-zero \
--no-fix \
| reviewdog \
-f=rdjson \
-name="ruff" \
-reporter=github-pr-review \
-filter-mode=diff_context \
-fail-on-error=true