From 27f70ed5ec3acac64846fdc4a5fd3d887f7038f5 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Tue, 17 May 2022 10:32:12 -0700 Subject: [PATCH] Migrate CI to GitHub Actions (#150) --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ---------------- CONTRIBUTING.rst | 6 +----- README.rst | 6 +----- 4 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65827d6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.7', '3.8', '3.9', '3.10'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-python-${{ matrix.python-version }}-pip-${{ hashFiles('.github/workflows/ci.yml') }} + restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-pip + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Lint + if: matrix.python-version == '3.10' + run: tox -e flake8 + - name: Tests + run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f2113c5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -branches: - only: - - "master" -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" -cache: pip -install: - - pip install tox-travis -script: - - tox -services: - - redis-server diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1698507..1e21912 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -125,8 +125,4 @@ Before you submit a pull request, check that it meets these guidelines: 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. -3. The pull request should work for Python 2.6, 2.7 and 3.3+. Check - `Travis`_ and make sure that - the tests pass for all supported Python versions. - -.. _Travis: https://travis-ci.org/pinterest/snappass/pull_requests +3. The pull request should work on all supported Python versions. diff --git a/README.rst b/README.rst index 651fef8..8b25c1c 100644 --- a/README.rst +++ b/README.rst @@ -2,16 +2,12 @@ SnapPass ======== -|pypi| |build| +|pypi| .. |pypi| image:: https://img.shields.io/pypi/v/snappass.svg :target: https://pypi.python.org/pypi/snappass :alt: Latest version released on PyPI -.. |build| image:: https://travis-ci.org/pinterest/snappass.svg - :target: https://travis-ci.org/pinterest/snappass - :alt: Build status - It's like SnapChat... for passwords. This is a web app that lets you share passwords securely.