kopia lustrzana https://github.com/sepandhaghighi/samila
add : requirements-splitter.py added.
rodzic
92874f22fa
commit
c78d74514d
|
@ -28,9 +28,10 @@ jobs:
|
|||
run: |
|
||||
python -m samila
|
||||
if: matrix.os != 'macOS-latest'
|
||||
- name: Install dev-requirements
|
||||
- name: Test requirements Installation
|
||||
run: |
|
||||
pip install --upgrade --upgrade-strategy=only-if-needed -r dev-requirements.txt
|
||||
python otherfiles/requirements-splitter.py
|
||||
pip install --upgrade --upgrade-strategy=only-if-needed -r test-requirements.txt
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python -m pytest test --cov=samila --cov-report=term
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Requirements splitter."""
|
||||
|
||||
test_req = ""
|
||||
|
||||
with open('dev-requirements.txt', 'r') as f:
|
||||
for line in f:
|
||||
if '==' not in line:
|
||||
test_req += line
|
||||
|
||||
with open('test-requirements.txt', 'w') as f:
|
||||
f.write(test_req)
|
Ładowanie…
Reference in New Issue