mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-17 01:26:16 +03:00
* Bump actions/checkout v7.0.0 => v7.0.1 * Bump actions/setup-node v6.4.0 => v7.0.0 * Bump actions/setup-python v6.3.0 => v7.0.0 * Bump denoland/setup-deno v2.0.4 => v2.0.5 * Bump github/codeql-action v4.36.3 => v4.37.7 * Bump pypa/gh-action-pypi-publish v1.14.0 => v1.14.2 * Bump zizmorcore/zizmor-action v0.5.7 => v0.6.2 Authored by: dlp-bot
90 lines
2.9 KiB
YAML
90 lines
2.9 KiB
YAML
name: Test and lint workflows
|
|
on:
|
|
push:
|
|
branches: ['master']
|
|
# This workflow contains required checks and needs to run for EVERY pull_request
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: test-workflows-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
ACTIONLINT_VERSION: "1.7.12"
|
|
ACTIONLINT_SHA256SUM: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
|
|
ACTIONLINT_REPO: rhysd/actionlint
|
|
GH_TELEMETRY: "false"
|
|
|
|
jobs:
|
|
check:
|
|
# Required check; do not change name
|
|
name: Check workflows
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: "3.13" # Keep this in sync with release.yml's prepare job
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt"
|
|
python -m pip install -U --require-hashes -r "bundle/requirements/pyflakes.txt"
|
|
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
|
|
|
|
- name: Install requirements
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
ACTIONLINT_TARBALL: ${{ format('actionlint_{0}_linux_amd64.tar.gz', env.ACTIONLINT_VERSION) }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt -y install shellcheck
|
|
gh release download \
|
|
--repo "${ACTIONLINT_REPO}" \
|
|
--pattern "${ACTIONLINT_TARBALL}" \
|
|
"v${ACTIONLINT_VERSION}"
|
|
gh attestation verify \
|
|
--repo "${ACTIONLINT_REPO}" \
|
|
"${ACTIONLINT_TARBALL}"
|
|
printf '%s %s' "${ACTIONLINT_SHA256SUM}" "${ACTIONLINT_TARBALL}" | sha256sum -c -
|
|
tar xvzf "${ACTIONLINT_TARBALL}" actionlint
|
|
sudo install -D --mode=755 actionlint /usr/bin/
|
|
|
|
- name: Run actionlint
|
|
run: |
|
|
actionlint -color
|
|
|
|
- name: Check Docker shell scripts
|
|
run: |
|
|
shellcheck bundle/docker/linux/*.sh
|
|
|
|
- name: Test GHA devscripts
|
|
run: |
|
|
pytest -Werror --tb=short --color=yes devscripts/setup_variables_tests.py
|
|
|
|
zizmor:
|
|
# Required check; do not change name
|
|
name: Run zizmor
|
|
permissions:
|
|
contents: read
|
|
actions: read # Needed by zizmorcore/zizmor-action if repository is private
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Run zizmor
|
|
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
|
|
with:
|
|
advanced-security: false
|
|
persona: pedantic
|