Compare commits
3 Commits
9443255911
...
0b28839035
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b28839035 | |||
| 40739fcc08 | |||
| 98dc4a4360 |
@@ -1,4 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2023 DB Systel GmbH
|
||||
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -11,28 +12,6 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
# # Test using the tool via poetry on different OSes and python versions
|
||||
# test-os-python-matrix:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# max-parallel: 10
|
||||
# # do not abort the whole test job if one combination in the matrix fails
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# python-version: ["3.9", "3.10", "3.11"]
|
||||
# os: [ubuntu-20.04]
|
||||
# include:
|
||||
# - python-version: "3.9"
|
||||
# os: macos-latest
|
||||
# - python-version: "3.9"
|
||||
# os: windows-latest
|
||||
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: ./.gitea/actions/poetrybuild
|
||||
# - name: Execute seafile-mirror
|
||||
# run: poetry run ossrfc --help
|
||||
|
||||
# Test building the package and installing it via pip3
|
||||
test-build-install:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -45,7 +24,9 @@ jobs:
|
||||
- name: Install package
|
||||
run: pip3 install dist/seafile_mirror-*.tar.gz
|
||||
- name: Run package
|
||||
run: seafile-mirror --help
|
||||
run: |
|
||||
seafile-mirror --version
|
||||
seafile-mirror --help
|
||||
|
||||
# Run tool and sync a test library
|
||||
selftest:
|
||||
@@ -70,7 +51,7 @@ jobs:
|
||||
- name: Sync the library
|
||||
run: poetry run seafile-mirror -c tests -v
|
||||
- name: Attempt to find expected string in library
|
||||
run: grep "__ci_test_expectXXX__" tests/ci-test/testfile.txt
|
||||
run: grep "__ci_test_expect__" tests/ci-test/testfile.txt
|
||||
|
||||
# PYLINT / BLACK / ISORT / MYPY
|
||||
pylint:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
"""Global init file"""
|
||||
|
||||
from importlib.metadata import version
|
||||
|
||||
__version__ = version("seafile-mirror")
|
||||
|
||||
@@ -14,6 +14,7 @@ from time import sleep
|
||||
|
||||
import yaml
|
||||
|
||||
from . import __version__
|
||||
from ._cachedb import db_read
|
||||
from ._helpers import convert_bytes, findstring, get_lock
|
||||
from ._seafile import (
|
||||
@@ -48,9 +49,10 @@ parser.add_argument(
|
||||
default=False,
|
||||
help="Print and log DEBUG messages",
|
||||
)
|
||||
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
|
||||
|
||||
|
||||
def main():
|
||||
def main(): # pylint: disable=too-many-locals, too-many-statements
|
||||
"""Main function"""
|
||||
args = parser.parse_args()
|
||||
# Set files depending on configdir
|
||||
|
||||
Reference in New Issue
Block a user