1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00
gallery-dl/.github/workflows/tests.yml

74 lines
1.7 KiB
YAML
Raw Normal View History

2020-11-17 19:40:45 +01:00
name: tests
on:
workflow_dispatch:
2020-11-17 19:40:45 +01:00
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-20.04
2020-11-17 19:40:45 +01:00
strategy:
fail-fast: false
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9"]
2020-11-17 19:40:45 +01:00
steps:
- uses: actions/checkout@v4
2020-11-17 19:40:45 +01:00
2023-06-25 00:48:40 +02:00
- name: Check file permissions
run: |
2023-06-25 00:48:40 +02:00
if [[ "$(find ./gallery_dl -type f -not -perm 644)" ]]; then exit 1; fi
2020-11-17 19:40:45 +01:00
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
2020-11-17 19:40:45 +01:00
with:
python-version: ${{ matrix.python-version }}
env:
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
2020-11-17 19:40:45 +01:00
- name: Install dependencies
run: |
pip install -r requirements.txt
2023-09-15 14:19:47 +02:00
pip install flake8 youtube-dl
- name: Install yt-dlp
run: |
case "${{ matrix.python-version }}" in
3.4|3.5)
# don't install yt-dlp
;;
3.6|3.7|3.8)
# install from PyPI
pip install yt-dlp
;;
*)
# install from master
pip install https://github.com/yt-dlp/yt-dlp/archive/refs/heads/master.tar.gz
;;
esac
2020-11-17 19:40:45 +01:00
- name: Lint with flake8
run: |
case "${{ matrix.python-version }}" in
3.4|3.5|3.6|3.7)
flake8 --extend-exclude scripts/export_tests.py,scripts/pyprint.py .
;;
*)
flake8 .
;;
esac
2020-11-17 19:40:45 +01:00
- name: Run tests
run: |
make test
2022-10-25 15:48:37 +02:00
- name: Test autogeneration of man pages, bash/zsh/fish completion, etc
2020-11-17 19:40:45 +01:00
run: |
make