Skip to content

Commit

Permalink
Merge pull request #968 from asottile/github_actions
Browse files Browse the repository at this point in the history
use github actions instead of travis-ci
  • Loading branch information
sigmavirus24 authored Nov 7, 2020
2 parents a35d409 + a6e25e1 commit 07b113b
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 42 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: main
on:
pull_request:
push:
branches: [master, 'test-me-*']
tags: ['*']

jobs:
main:
strategy:
matrix:
include:
- os: windows-latest
py: 2.7
toxenv: py
- os: windows-latest
py: 3.9
toxenv: py
- os: ubuntu-latest
py: pypy2
toxenv: py
- os: ubuntu-latest
py: pypy3
toxenv: py
- os: ubuntu-latest
py: 2.7
toxenv: py
- os: ubuntu-latest
py: 3.4
toxenv: py
- os: ubuntu-latest
py: 3.5
toxenv: py
- os: ubuntu-latest
py: 3.6
toxenv: py
- os: ubuntu-latest
py: 3.7
toxenv: py
- os: ubuntu-latest
py: 3.8
toxenv: py
- os: ubuntu-latest
py: 3.9
toxenv: py
- os: ubuntu-latest
py: 3.9
toxenv: flake8
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

14 changes: 8 additions & 6 deletions testsuite/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

class UtilTestCase(unittest.TestCase):
def test_normalize_paths(self):
cwd = os.getcwd()

self.assertEqual(normalize_paths(''), [])
self.assertEqual(normalize_paths([]), [])
self.assertEqual(normalize_paths(None), [])
self.assertEqual(normalize_paths(['foo']), ['foo'])
self.assertEqual(normalize_paths('foo'), ['foo'])
self.assertEqual(normalize_paths('foo,bar'), ['foo', 'bar'])
self.assertEqual(normalize_paths('foo, bar '), ['foo', 'bar'])
self.assertEqual(normalize_paths('/foo/bar,baz/../bat'),
[os.path.realpath('/foo/bar'), cwd + '/bat'])
self.assertEqual(normalize_paths(".pyc,\n build/*"),
['.pyc', cwd + '/build/*'])
self.assertEqual(
normalize_paths('/foo/bar,baz/../bat'),
[os.path.realpath('/foo/bar'), os.path.abspath('bat')],
)
self.assertEqual(
normalize_paths(".pyc,\n build/*"),
['.pyc', os.path.abspath('build/*')],
)

0 comments on commit 07b113b

Please sign in to comment.