mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 08:42:29 +00:00
Add formatting/linting CI (#18)
This commit is contained in:
88
.github/workflows/ci.yml
vendored
88
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user