enhancement:main yml
Black and flake8 tests are added
@@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
- python-version: [3.6]
+ python-version: [3.6, 3.7]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -68,12 +68,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements.txt
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ if [ -f tests/requirements.txt]; then pip install -r tests/requirements.txt; fi
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world! Welcome PyElastica Build, lets start testing!
+ # Formatting test with black and flake8
+ - name: Black and Flake8 formatting tests
+ run: |
+ if [${{ matrix.python-version }} == '3.6']; then black --version && black --check elastica tests; flake8 --version && flake8 elastica tests; fi
+
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
