Skip to content

Commit

Permalink
tests: add GitHubCI smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matrach committed Jun 3, 2023
1 parent 233d590 commit 6a94265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
run: python -m pip install --upgrade pip
- name: Install deps
run: pip install -U -e .[n2]
if: runner.os != "Windows"
if: ${{ runner.os != 'Windows' }}
- name: Install deps without n2
run: pip install -U -e .
if: runner.os = "Windows"
if: ${{ runner.os == 'Windows' }}
- name: Run renderers on examples
run: |
cd examples
Expand Down
6 changes: 5 additions & 1 deletion examples/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@
basedir.mkdir(exist_ok=True, parents=True)
for opt_name, opt in optimizers.items():
s = time.time()
renderer.render_terminal(img_path, (basedir/opt_name).with_suffix('.txt'), optimizer=opt)
file = (basedir / opt_name).with_suffix('.txt')
if os.name == 'nt':
# Windows runners seem strange
file = file.open(mode='w', encoding='utf-16')
renderer.render_terminal(img_path, file, optimizer=opt)
e = time.time()
img_fn = (basedir/opt_name).with_suffix('.png')
renderer.prerender(img_path, optimizer=opt).save(img_fn)
Expand Down

0 comments on commit 6a94265

Please sign in to comment.