From 325c03ac12b0465eb9e5c6b8d2c239e809b29c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Thu, 15 Jul 2021 17:20:59 +0200 Subject: [PATCH] Switch from Travis CI to GitHub Actions And include Python 3.9 in test matrix --- .github/workflows/tests.yml | 51 +++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ------------ README.md | 2 +- requirements-dev.txt | 3 ++- 4 files changed, 54 insertions(+), 18 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..367659d --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,51 @@ +--- +name: Tests + +on: + push: + branches: + - master + - gh-actions + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - 2.7 + - 3.6 + - 3.7 + - 3.8 + - 3.9 + + env: + AWS_DEFAULT_REGION: eu-west-1 + AWS_ACCESS_KEY_ID: dummy + AWS_SECRET_ACCESS_KEY: dummy + BOTO_CONFIG: /dev/null + + 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: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r requirements-dev.txt + + - name: Run tests + run: nosetests + + - name: Report coverage + run: | + nosetests --with-coverage --cover-erase --cover-html --cover-package=ssm_cache + coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c63de05..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python -sudo: false -python: - - 2.7 - - 3.6 - - 3.7 - - 3.8 -env: - - AWS_DEFAULT_REGION=eu-west-1 AWS_ACCESS_KEY_ID=dummy AWS_SECRET_ACCESS_KEY=dummy BOTO_CONFIG=/dev/null -install: - - travis_retry pip install -r requirements-dev.txt -script: - - nosetests -after_success: - - nosetests --with-coverage --cover-erase --cover-html --cover-package=ssm_cache - - coveralls diff --git a/README.md b/README.md index 41e1b0a..a1157ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ AWS System Manager Parameter Store Caching Client for Python ([![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![Python 3.6](https://img.shields.io/badge/python-3.6-green.svg)](https://www.python.org/downloads/release/python-360/) [![Python 3.7](https://img.shields.io/badge/python-3.7-green.svg)](https://www.python.org/downloads/release/python-370/)) ========================================================== -[![Build Status](https://travis-ci.org/alexcasalboni/ssm-cache-python.svg?branch=master)](https://travis-ci.org/alexcasalboni/ssm-cache-python) +[![Build Status](https://github.com/alexcasalboni/ssm-cache-python/actions/workflows/tests.yml/badge.svg)](https://github.com/alexcasalboni/ssm-cache-python/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/github/alexcasalboni/ssm-cache-python/badge.svg)](https://coveralls.io/github/alexcasalboni/ssm-cache-python) [![PyPI version](https://badge.fury.io/py/ssm-cache.svg)](https://badge.fury.io/py/ssm-cache) [![GitHub license](https://img.shields.io/github/license/alexcasalboni/ssm-cache-python.svg)](https://github.com/alexcasalboni/ssm-cache-python/blob/master/LICENSE) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5855656..6ba0152 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,8 @@ coverage==4.5.1 moto==1.3.7 nose==1.3.7 -Pygments==2.7.4 +Pygments<2.6; python_version < "3" +Pygments==2.7.4; python_version >= "3.6" pypandoc==1.4 coveralls==1.2.0 placebo==0.8.1