Skip to content

Commit

Permalink
Run tests on Linux/MacOS/Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondettmann committed Jun 12, 2020
1 parent cf82040 commit 524ab30
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
26 changes: 23 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
sudo: false
language: python
python:
- "3.6"

# See https://docs.travis-ci.com/user/languages/python/#running-python-tests-on-multiple-operating-systems
jobs:
include:
# === LINUX ===
- name: "Linux"
python: 3.8

# === MacOS ===
- name: "macOS"
os: osx
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4
language: shell # 'language: python' is an error on Travis CI macOS

# === Windows ===
- name: "Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
install:
- pip install -r requirements.txt
- pip3 install -r requirements.txt
script:
- tox
after_success:
Expand Down
1 change: 1 addition & 0 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
## Assembly
* (!!!) Add tests for multipoint-constraints
* Use sparse matrices
- https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.coo_matrix.html

## Misc
* Test run multiprocessing
Expand Down
5 changes: 3 additions & 2 deletions tests/integration/test_getting_started.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
from pathlib import Path
import os
import shutil

# Suppress Matplotlib figure
from matplotlib import pyplot as plt
Expand All @@ -21,7 +22,7 @@ def rerun_and_save_plots(model, fname):

old_fname = Path(r.get('files').get('plots')[0])
new_fname = os.path.join(os.path.dirname(old_fname), fname)
os.rename(old_fname, new_fname)
shutil.move(old_fname, new_fname)


def test_cantilever():
Expand Down

0 comments on commit 524ab30

Please sign in to comment.