diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..268c22a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,51 @@ +name: Build +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + test: + strategy: + matrix: + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + os: + - macos + - ubuntu + + name: tests + runs-on: ${{ matrix.os }}-latest + steps: + - uses: actions/checkout@v3.0.2 + + - uses: actions/setup-python@v4.2.0 + with: + python-version: ${{ matrix.python-version }} + + - run: pip install . + + - name: run tests + run: python setup.py test + + fuzz: + name: fuzz + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.0.2 + + - uses: actions/setup-python@v4.2.0 + with: + python-version: "3.10" + + - run: pip install . + + - name: run fuzz + run: python test_fuzz.py ./*.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2da68ab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: python - -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - -env: - - PYFLAKES_VERSION=pypi - - PYFLAKES_VERSION=github - -install: - - if [ "$PYFLAKES_VERSION" == "github" ]; - then pip install git+https://github.com/pyflakes/pyflakes; fi - - pip install . - -script: - - ./setup.py test - - ./test_fuzz.py ./*.py - - - pyflakes ./*.py - - pip install pycodestyle pydocstyle - - pycodestyle ./*.py - - if [ "$TRAVIS_PYTHON_VERSION" != "3.4" ]; then pydocstyle autoflake.py setup.py; fi - -after_success: - - pip install --quiet coverage - - AUTOFLAKE_COVERAGE=1 coverage run --branch --parallel-mode --include='autoflake.py,test_autoflake.py' test_autoflake.py - - coverage combine - - coverage report --show-missing - - - pip install --quiet coveralls - - coveralls diff --git a/test_autoflake.py b/test_autoflake.py index cd279a2..2a37e5e 100755 --- a/test_autoflake.py +++ b/test_autoflake.py @@ -1200,7 +1200,6 @@ def test_is_literal_or_name(self): self.assertFalse(autoflake.is_literal_or_name('xyz.prop')) self.assertFalse(autoflake.is_literal_or_name(' ')) - self.assertFalse(autoflake.is_literal_or_name(' 1')) def test_is_python_file(self): self.assertTrue(autoflake.is_python_file(