Browse Source

Merge pull request #402 from saimn/github-actions

Switch to GitHub actions
pull/403/head
Simon Conseil 6 years ago committed by GitHub
parent
commit
ce44f45083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 43
      .github/workflows/python-tests.yml
  2. 44
      .travis.yml
  3. 6
      README.rst
  4. 16
      tox.ini

43
.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

44
.travis.yml

@ -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"

6
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

16
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 =

Loading…
Cancel
Save