Skip to content

Commit 25e9565

Browse files
majsylwsdatko
andcommitted
Configure CI for project
Co-Authored-By: Szymon Datko <szymon.datko@pwr.edu.pl>
1 parent d911f2c commit 25e9565

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: themattrix/tox
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2.0.0
13+
- name: Tests
14+
run: |
15+
tox -v

tox.ini

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[tox]
2+
minversion = 1.6
3+
skipsdist = True
4+
envlist = examples,flake8,autopep8
5+
6+
[testenv]
7+
basepython = python3
8+
usedevelop = True
9+
install_command = pip install {opts} {packages}
10+
11+
[testenv:examples]
12+
# Env variable MPLBACKEND=Agg prevents display of windows during tests
13+
deps = -r requirements.txt
14+
setenv =
15+
MPLBACKEND=Agg
16+
commands =
17+
python examples/test_Dudley.py
18+
python examples/plot_Raman_response.py
19+
python examples/test_gvd.py
20+
python examples/test_spm.py
21+
python examples/test_3rd_order_soliton.py
22+
python examples/test_import_export.py
23+
python examples/test_spm+gvd.py
24+
25+
[testenv:flake8]
26+
deps = -r requirements.txt
27+
commands =
28+
flake8
29+
30+
[testenv:autopep8]
31+
deps = -r requirements.txt
32+
commands =
33+
python -m autopep8 --recursive --aggressive --diff --exit-code .
34+
35+
[flake8]
36+
exclude = .git,.tox

0 commit comments

Comments
 (0)