2021-01-23 09:30:48 +01:00
|
|
|
name: Quick Test
|
2021-01-16 19:54:52 +01:00
|
|
|
on: [push, pull_request]
|
2022-11-10 02:41:07 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-01-07 21:46:48 +01:00
|
|
|
jobs:
|
|
|
|
tests:
|
2021-02-04 23:53:04 +01:00
|
|
|
name: Core Test
|
2021-01-23 09:30:48 +01:00
|
|
|
if: "!contains(github.event.head_commit.message, 'ci skip all')"
|
2021-01-07 21:46:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-13 01:30:01 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-30 22:27:36 +01:00
|
|
|
- name: Set up Python 3.8
|
2024-02-11 15:47:16 +01:00
|
|
|
uses: actions/setup-python@v5
|
2021-01-07 21:46:48 +01:00
|
|
|
with:
|
2023-12-30 22:27:36 +01:00
|
|
|
python-version: '3.8'
|
2021-07-21 22:32:49 +02:00
|
|
|
- name: Install test requirements
|
2024-09-28 00:46:22 +02:00
|
|
|
run: python3 ./devscripts/install_deps.py -o --include test
|
2021-01-07 21:46:48 +01:00
|
|
|
- name: Run tests
|
2024-08-21 09:17:26 +02:00
|
|
|
timeout-minutes: 15
|
2022-11-30 07:04:51 +01:00
|
|
|
run: |
|
|
|
|
python3 -m yt_dlp -v || true
|
2024-10-01 00:33:17 +02:00
|
|
|
python3 ./devscripts/run_tests.py --pytest-args '--reruns 2 --reruns-delay 3.0' core
|
2024-05-26 21:27:21 +02:00
|
|
|
check:
|
|
|
|
name: Code check
|
2021-01-23 09:30:48 +01:00
|
|
|
if: "!contains(github.event.head_commit.message, 'ci skip all')"
|
2021-01-07 21:46:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-13 01:30:01 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-02-11 15:47:16 +01:00
|
|
|
- uses: actions/setup-python@v5
|
2024-04-09 18:12:26 +02:00
|
|
|
with:
|
|
|
|
python-version: '3.8'
|
2024-05-26 21:27:21 +02:00
|
|
|
- name: Install dev dependencies
|
|
|
|
run: python3 ./devscripts/install_deps.py -o --include static-analysis
|
2021-08-22 21:19:23 +02:00
|
|
|
- name: Make lazy extractors
|
2024-02-11 15:17:08 +01:00
|
|
|
run: python3 ./devscripts/make_lazy_extractors.py
|
2024-05-26 21:27:21 +02:00
|
|
|
- name: Run ruff
|
|
|
|
run: ruff check --output-format github .
|
|
|
|
- name: Run autopep8
|
|
|
|
run: autopep8 --diff .
|