diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..021ad07 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +--- +name: build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [2.7, 3.5, 3.6, 3.7] + + steps: + - uses: actions/checkout@v1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Lint with flake8 + run: | + pip install flake8 + flake8 . --count --max-line-length=127 --statistics + + - name: Test with pytest + run: | + pip install pytest + pytest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 82e5b48..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -sudo: false -dist: xenial -cache: pip -language: python -python: - - "2.7" - - "3.5" - - "3.7" -install: - - pip install -r requirements.txt -script: - - pytest -notifications: - email: false diff --git a/README.md b/README.md index 5f6ee7e..7b50680 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Delete tweets -[![Build Status](https://travis-ci.com/koenrh/delete-tweets.svg?branch=master)](https://travis-ci.com/koenrh/delete-tweets) +![](https://github.com/koenrh/delete-tweets/workflows/build/badge.svg) This is a simple script that helps you delete tweets (or just replies or retweets) from your timeline. There are quite a few third-party services that allow you diff --git a/test_deletetweets.py b/test_deletetweets.py index 7b5a0f0..b6ec128 100644 --- a/test_deletetweets.py +++ b/test_deletetweets.py @@ -1,6 +1,5 @@ import unittest -from datetime import date from deletetweets import TweetReader @@ -76,7 +75,7 @@ def test_tweet_reader_spare(self): expected = [{"id_str": "21"}, {"id_str": "22"}] for idx, val in enumerate(TweetReader(FakeReader(tweets), - spare=["22","23"]).read()): + spare=["22", "23"]).read()): self.assertEqual(expected[idx]["id_str"], val["id_str"]) def test_tweet_reader_likes(self):