1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-03 16:15:14 +00:00

[ci] Test and lint workflows (#14249)

Authored by: bashonly
This commit is contained in:
bashonly
2025-09-06 17:28:11 -05:00
committed by GitHub
parent cd94e70040
commit 7c9b10ebc8
3 changed files with 75 additions and 1 deletions

View File

@@ -81,7 +81,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.10" # Keep this in sync with test-workflows.yml
- name: Process inputs
id: process_inputs

46
.github/workflows/test-workflows.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Test and lint workflows
on:
push:
paths:
- .github/workflows/*
- devscripts/setup_variables.py
- devscripts/setup_variables_tests.py
- devscripts/utils.py
pull_request:
paths:
- .github/workflows/*
- devscripts/setup_variables.py
- devscripts/setup_variables_tests.py
- devscripts/utils.py
permissions:
contents: read
env:
ACTIONLINT_VERSION: "1.7.7"
ACTIONLINT_SHA256SUM: 023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757
ACTIONLINT_REPO: https://github.com/rhysd/actionlint
jobs:
check:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10" # Keep this in sync with release.yml's prepare job
- name: Install requirements
env:
ACTIONLINT_TARBALL: ${{ format('actionlint_{0}_linux_amd64.tar.gz', env.ACTIONLINT_VERSION) }}
run: |
sudo apt -y install shellcheck
python -m pip install -U pyflakes
curl -LO "${ACTIONLINT_REPO}/releases/download/v${ACTIONLINT_VERSION}/${ACTIONLINT_TARBALL}"
printf '%s %s' "${ACTIONLINT_SHA256SUM}" "${ACTIONLINT_TARBALL}" | sha256sum -c -
tar xvzf "${ACTIONLINT_TARBALL}" actionlint
chmod +x actionlint
- name: Run actionlint
run: |
./actionlint -color
- name: Test GHA devscripts
run: |
python -m devscripts.setup_variables_tests