From 15192f19e0e2930b9a077e156c053983e758c8fb Mon Sep 17 00:00:00 2001 From: Grey Li Date: Wed, 15 Nov 2023 22:00:21 +0800 Subject: [PATCH] Set up github actions --- .github/workflows/tests.yml | 41 +++++++++++++++++++++++++++++++++++++ .travis.yml | 9 -------- README.rst | 4 ++-- tox.ini | 2 +- 4 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..26878dc --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: Tests +on: + push: + branches: + - master + paths-ignore: + - 'docs/**' + - '*.rst' + pull_request: + branches: + - master + paths-ignore: + - 'docs/**' + - '*.rst' +jobs: + tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311} + - {name: Windows, python: '3.11', os: windows-latest, tox: py311} + - {name: Mac, python: '3.11', os: macos-latest, tox: py311} + - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310} + - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} + - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} + - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} + - {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36} + - {name: '2.7', python: '2.7', os: ubuntu-latest, tox: py27} + - {name: Style, python: '3.10', os: ubuntu-latest, tox: stylecheck} + steps: + - uses: actions/checkout@v4 + - name: update pip + run: | + pip install -U wheel + pip install -U setuptools + python -m pip install -U pip + - run: pip install tox + - run: tox -e ${{ matrix.tox }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 043bbbc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false -language: python -python: "3.8" -env: - - TOXENV=py27 - - TOXENV=py38 -install: - - pip install tox -script: tox diff --git a/README.rst b/README.rst index ab44675..8cdec78 100644 --- a/README.rst +++ b/README.rst @@ -4,8 +4,8 @@ Flask Debug-toolbar This is a port of the excellent `django-debug-toolbar `_ for Flask applications. -.. image:: https://travis-ci.org/flask-debugtoolbar/flask-debugtoolbar.png?branch=master - :target: https://travis-ci.org/flask-debugtoolbar/flask-debugtoolbar +.. image:: https://github.com/pallets-eco/flask-debugtoolbar/actions/workflows/tests.yml/badge.svg + :target: https://github.com/pallets-eco/flask-debugtoolbar/actions Installation diff --git a/tox.ini b/tox.ini index a4a8573..6483179 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py36,py37,py38,stylecheck +envlist = py27,py36,py37,py38,py39,py310,py311,stylecheck [testenv] deps =