refactor: complete Python-first local runtime migration #305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| secret-scan: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Secret scan (gitleaks) | |
| uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Optional knobs | |
| # - docs: https://github.com/gitleaks/gitleaks-action#environment-variables | |
| # - config: create `gitleaks.toml` at repo root or set `GITLEAKS_CONFIG` to a config path | |
| GITLEAKS_ENABLE_SUMMARY: "true" | |
| GITLEAKS_ENABLE_UPLOAD_ARTIFACT: "false" | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| CI: "1" | |
| LEFTHOOK: "0" | |
| npm_config_cache: ${{ github.workspace }}/.npm-cache | |
| npm_config_devdir: ${{ github.workspace }}/.node-gyp | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.20.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.6.12" | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Python dependencies | |
| run: uv sync --directory apps/api --locked | |
| - name: Commitlint (pull_request) | |
| if: github.event_name == 'pull_request' | |
| run: pnpm exec commitlint --from "${{ github.event.pull_request.base.sha }}" --to "${{ github.event.pull_request.head.sha }}" --verbose | |
| - name: Enforce single-line commit messages (pull_request) | |
| if: github.event_name == 'pull_request' | |
| run: node scripts/check-commit-messages-single-line.mjs --from "${{ github.event.pull_request.base.sha }}" --to "${{ github.event.pull_request.head.sha }}" | |
| - name: Commitlint (push) | |
| if: github.event_name == 'push' | |
| run: pnpm exec commitlint --from "${{ github.event.before }}" --to "${{ github.sha }}" --verbose | |
| - name: Enforce single-line commit messages (push) | |
| if: github.event_name == 'push' | |
| run: node scripts/check-commit-messages-single-line.mjs --from "${{ github.event.before }}" --to "${{ github.sha }}" | |
| - name: Quality Gate | |
| run: pnpm check:ci | |
| - name: Test Coverage | |
| run: pnpm test:coverage |