-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'wsl' | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
|
||
msys: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MSYS | ||
update: true | ||
install: python-pip | ||
- uses: actions/checkout@v2 | ||
- run: python -m pip install --progress-bar off pytest | ||
- run: ./wsl.sh | ||
- run: python -m pytest -v -s -ra wsl.py --color=yes | ||
|
||
mingw64: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW64 | ||
update: true | ||
install: mingw-w64-x86_64-python-pip | ||
- uses: actions/checkout@v2 | ||
- run: python -m pip install --progress-bar off pytest | ||
- run: ./wsl.sh | ||
- run: python -m pytest -v -s -ra wsl.py --color=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Verify that all example run scripts work correctly | ||
""" | ||
|
||
import sys | ||
from sys import platform | ||
from os import environ | ||
from pathlib import Path | ||
from subprocess import check_call, STDOUT | ||
import unittest | ||
from shutil import which | ||
|
||
|
||
class TestExamples(unittest.TestCase): | ||
""" | ||
Verify that example run scripts work correctly | ||
""" | ||
|
||
def setUp(self): | ||
self.shell = ['bash'] if platform == 'win32' else [] | ||
|
||
print('\n::group::Log') | ||
sys.stdout.flush() | ||
|
||
def tearDown(self): | ||
print('\n::endgroup::') | ||
sys.stdout.flush() | ||
|
||
def _sh(self, args): | ||
check_call(self.shell + args, stderr=STDOUT) | ||
|
||
def test_wsl_conflict(self): | ||
self._sh([str(Path(__file__).parent / 'wsl.sh')]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo "HELLO" |