diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..77195d3e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy3] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Lint with flake8 + run: | + pip install flake8 + flake8 . + + - name: Run tests + run: | + pip install nose + make test + + - name: Generate man pages and bash/zsh completion + run: | + make man completion diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9b9ff917..00000000 --- a/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -language: python -python: - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "pypy3" -env: - - GALLERYDL_TESTS=core -matrix: - include: - - python: "3.8" - env: GALLERYDL_TESTS=results - - python: "3.8" - env: GALLERYDL_TESTS=flake8 - install: pip install flake8 - script: flake8 . - - language: minimal - env: GALLERYDL_TESTS=snap - addons: - snaps: - - name: snapcraft - classic: true - install: - - true - script: - - sudo apt update - - snapcraft --destructive-mode - - sudo snap try - - snap run gallery-dl --verbose https://en.wikipedia.org/static/images/project-logos/enwiki.png - allow_failures: - - env: GALLERYDL_TESTS=results - - env: GALLERYDL_TESTS=snap - -git: - depth: 3 - quiet: true -branches: - only: - - master - - /^v\d+\.\d+\.\d+(-\S*)?$/ - - /^test(-\w+)+$/ -script: - - ./scripts/run_tests.sh diff --git a/README.rst b/README.rst index ccc745a9..b915389d 100644 --- a/README.rst +++ b/README.rst @@ -326,8 +326,8 @@ access to *gallery-dl*. Authorize it and you will be shown one or more .. |pypi| image:: https://img.shields.io/pypi/v/gallery-dl.svg :target: https://pypi.org/project/gallery-dl/ -.. |build| image:: https://travis-ci.com/mikf/gallery-dl.svg?branch=master - :target: https://travis-ci.com/mikf/gallery-dl +.. |build| image:: https://github.com/mikf/gallery-dl/workflows/tests/badge.svg + :target: https://github.com/mikf/gallery-dl/actions .. |gitter| image:: https://badges.gitter.im/gallery-dl/main.svg :target: https://gitter.im/gallery-dl/main