Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use github actions instead of travis-ci #968

Merged
merged 1 commit into from
Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-*']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't want to keep 'test-me-* in here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I usually find this useful to debug CI without having to open a PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid question: If you can push to a repo and you trust others who can push to the repo, why bother restricting this at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's mostly so when pushing branches pushed to pycqa/pycodestyle and creating a pull request based on them you don't run the actions twice

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 You're still running them twice, just once on a random push, and a second time when opening the PR. They're just separate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 I don't personally see any problems with running tests that often. But also CI systems never actually test against a merged build, just against the head of the branch so they're usually trash either way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GA tests against the merged revision

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't update when master moves forward in my testing though so it's a point-in-time merged revision, not one before you press merge

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an argument against GA just a general gripe

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/*')],
)