Compare commits
5 Commits
v3.0.1-bet
...
v3.0.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
| deadbe9383 | |||
| 5cbec2e06f | |||
| 66d284f183 | |||
| ae64fd6e99 | |||
| 305bd3008d |
22
.github/workflows/python-publish.yml
vendored
22
.github/workflows/python-publish.yml
vendored
@ -14,19 +14,33 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
|
||||||
|
- name: Set up Python 3.x
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- name: Install dependencies
|
|
||||||
|
- name: Set up Python 2.x
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '2.x'
|
||||||
|
|
||||||
|
- name: Install dependencies 3.x
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install setuptools wheel twine
|
pip install setuptools wheel twine
|
||||||
|
|
||||||
|
- name: Install dependencies 2.x
|
||||||
|
run: |
|
||||||
|
python2 -m pip install --upgrade pip
|
||||||
|
pip2 install setuptools
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
||||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python3 setup.py sdist bdist_wheel
|
||||||
python3 -m twine check dist/*
|
python2 setup.py sdist bdist_wheel
|
||||||
|
twine check dist/*
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
|
|||||||
28
.github/workflows/regression.yml
vendored
28
.github/workflows/regression.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: lsmod && sudo apt update && sudo apt install zfsutils-linux && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls
|
run: sudo apt update && sudo apt install zfsutils-linux && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls
|
||||||
|
|
||||||
|
|
||||||
- name: Regression test
|
- name: Regression test
|
||||||
@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: lsmod && sudo apt update && sudo apt install zfsutils-linux python3-setuptools && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls
|
run: sudo apt update && sudo apt install zfsutils-linux python3-setuptools && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls
|
||||||
|
|
||||||
|
|
||||||
- name: Regression test
|
- name: Regression test
|
||||||
@ -50,3 +50,27 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: coveralls --service=github
|
run: coveralls --service=github
|
||||||
|
|
||||||
|
ubuntu18_python2:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
|
- name: Set up Python 2.x
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '2.x'
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: sudo apt update && sudo apt install zfsutils-linux python-setuptools && sudo -H pip install coverage unittest2 mock==3.0.5 coveralls
|
||||||
|
|
||||||
|
- name: Regression test
|
||||||
|
run: sudo -E ./tests/run_tests
|
||||||
|
|
||||||
|
- name: Coveralls
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: coveralls --service=github
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
|
# python 2 compatibility
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
colorama = False
|
colorama = False
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
# python 2 compatibility
|
||||||
|
from __future__ import print_function
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def cli():
|
def cli():
|
||||||
import sys
|
import sys
|
||||||
from zfs_autobackup.ZfsAutobackup import ZfsAutobackup
|
from zfs_autobackup.ZfsAutobackup import ZfsAutobackup
|
||||||
|
|||||||
Reference in New Issue
Block a user