diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000..a233f4a --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,43 @@ +name: Run unit tests + +on: + pull_request: + push: + branches: + - master + tags: + workflow_dispatch: + schedule: + # Run every Sunday at 03:53 UTC + - cron: 53 3 * * * + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, pypy3] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install FFmpeg + run: | + sudo apt install ffmpeg + ffmpeg -version + - name: Install Tox + run: python -m pip install tox tox-gh-actions coverage + - name: Run Tox + run: tox + - name: Convert coverage + run: python -m coverage xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a019d9b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: python -cache: pip -dist: xenial - -matrix: - include: - - python: 3.6 - before_install: - - sudo add-apt-repository ppa:mc3man/xerus-media -y - - sudo apt-get update -qq - - sudo apt-get install -qq ubuntu-restricted-extras ffmpeg - before_script: - ffmpeg --help - - python: 3.7 - before_install: - - sudo add-apt-repository ppa:mc3man/xerus-media -y - - sudo apt-get update -qq - - sudo apt-get install -qq ubuntu-restricted-extras ffmpeg - before_script: - ffmpeg --help - - python: 3.8 - before_install: - - sudo add-apt-repository ppa:mc3man/xerus-media -y - - sudo apt-get update -qq - - sudo apt-get install -qq ubuntu-restricted-extras ffmpeg - before_script: - ffmpeg --help - - python: 3.8 - env: TOXENV=doc - - python: 3.8 - env: TOXENV=check - allow_failures: - - env: TOXENV=check - -install: pip install -U tox-travis - -script: tox -- -v - -after_success: - - pip install codecov - - codecov - -notifications: - irc: "chat.freenode.net#sigal" diff --git a/README.rst b/README.rst index be7bec1..27ca6d7 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ Sigal - Simple Static Gallery Generator ======================================= -.. image:: https://secure.travis-ci.org/saimn/sigal.png?branch=master - :target: https://travis-ci.org/saimn/sigal - :alt: Travis-ci: continuous integration status. +.. image:: https://github.com/saimn/sigal/workflows/CI/badge.svg?branch=master + :target: https://github.com/saimn/sigal/actions?workflow=CI + :alt: CI Status .. image:: https://codecov.io/gh/saimn/sigal/branch/master/graph/badge.svg :target: https://codecov.io/gh/saimn/sigal diff --git a/tox.ini b/tox.ini index 57777b3..d5bb105 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,22 @@ [tox] -envlist = py{36,37,38} +envlist = py{36,37,38}-pillow{70,71,-latest},pypy3,check skip_missing_interpreters = True -[travis] +[gh-actions] python = - 3.6: py36 - 3.7: py37 - 3.8: py38 + 3.6: py36-pillow70 + 3.7: py37-pillow71 + 3.8: py38-pillow-latest, check + pypy3: pypy3 [testenv] +deps = + pillow6: Pillow==6.0.0 + pillow7: Pillow==7.0.0 extras = all tests -commands = pytest --cov sigal --cov-report term-missing tests/ +commands = pytest --cov sigal --cov-report term tests/ [testenv:check] deps =