Skip to content

Commit

Permalink
First attempt at fixing Windows CI on GitHub Actions (#237)
Browse files Browse the repository at this point in the history
* First attempt at fixing Windows CI on GitHub Actions

* Don't use appveyor-style env vars and executable extensions

* Remove python-2-specific test that's breaking in GitHub actions (we don't support Python 2 any more)
  • Loading branch information
CleanCut authored Nov 2, 2020
1 parent 3334232 commit fb5733b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Windows CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-optional.txt
- name: Test
run: python -m green.cmdline -vvv -t green -s 1
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest] # Windows is handled in ci-windows.yml
python-version: [3.6, 3.7, 3.8]

steps:
Expand Down
19 changes: 0 additions & 19 deletions green/test/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,25 +723,6 @@ def test_printErrorsVerbose4(self):
self.assertIn("raise Exception", self.stream.getvalue())
self.assertIn("Error", self.stream.getvalue())

def test_printErrors_Py2Unicode(self):
"""
printErrors() doesn't crash in Python 2 when tracebacks contain unicode
"""
try:
raise Exception("Das Böse ist immer und überall")
except:
err = sys.exc_info()
self.args.verbose = 1
self.args.termcolor = False
gtr = GreenTestResult(self.args, GreenStream(self.stream))
gtr.addError(MyProtoTest(), proto_error(err))
gtr.printErrors() # We shouldn't hit an exception here
self.assertIn("\n\n", self.stream.getvalue())
self.assertIn("my_module.MyClass.myMethod", self.stream.getvalue())
self.assertIn("raise Exception", self.stream.getvalue())
self.assertIn("Error", self.stream.getvalue())
self.assertIn("Böse", self.stream.getvalue())

def test_addProtoTestResult(self):
"""
addProtoTestResult adds the correct things to the correct places.
Expand Down

0 comments on commit fb5733b

Please sign in to comment.