Add formatting/linting CI (#18)

This commit is contained in:
sepro
2025-10-23 21:24:31 +02:00
committed by GitHub
parent 52a4f9d19a
commit b57ce18965
12 changed files with 153 additions and 44 deletions

View File

@@ -1,27 +1,13 @@
name: CI
on:
push:
paths:
- ".github/workflows/ci.yml"
- ".github/workflows/release.yml"
- "hatch_build.py"
- "package.json"
- "pyproject.toml"
- "rollup.config.js"
- "run.ts"
- "src/**"
- "yt_dlp_ejs/**"
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
paths:
- ".github/workflows/ci.yml"
- ".github/workflows/release.yml"
- "hatch_build.py"
- "package.json"
- "pyproject.toml"
- "rollup.config.js"
- "run.ts"
- "src/**"
- "yt_dlp_ejs/**"
paths-ignore:
- 'README.md'
- 'LICENSE'
permissions:
contents: read
@@ -31,6 +17,56 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ruff-format:
name: Ruff format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/ruff-action@v3
with:
args: "check --output-format github"
ruff-lint:
name: Ruff linting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/ruff-action@v3
with:
args: "format --check --diff"
prettier:
name: Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Deno v2.x (latest)
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install Deno requirements
run: |
deno install
- name: Run Prettier check
run: |
deno task fmt:check
eslint:
name: ESLint check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Deno v2.x (latest)
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install Deno requirements
run: |
deno install
- name: Run ESLint check
run: |
deno task lint
python_tests:
name: Python tests
runs-on: ubuntu-latest
@@ -304,7 +340,17 @@ jobs:
node --test
all_passed:
needs: [deno_build, deno_tests, bun_build, bun_tests, node_build, node_tests]
needs:
- ruff-format
- ruff-lint
- prettier
- eslint
- deno_build
- deno_tests
- bun_build
- bun_tests
- node_build
- node_tests
runs-on: ubuntu-latest
steps:
- name: All checks passed