Compare commits

3 Commits

Author SHA1 Message Date
d15cb7bf63 add version command
All checks were successful
Test suites / test-build-install (pull_request) Successful in 27s
Test suites / selftest (pull_request) Successful in 51s
Test suites / pylint (pull_request) Successful in 33s
Test suites / formatting (pull_request) Successful in 27s
Test suites / mypy (pull_request) Successful in 29s
Test suites / reuse (pull_request) Successful in 7s
2024-01-16 16:28:42 +01:00
d54fcd5943 fix pylint by igoring some errors 2024-01-16 16:28:42 +01:00
272fef4ec0 add CI tests and publishing workflows 2024-01-16 16:28:42 +01:00
5 changed files with 42 additions and 64 deletions

View File

@@ -1,41 +0,0 @@
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
#
# SPDX-License-Identifier: Apache-2.0
name: Python Linters
on:
push:
branches:
- main
pull_request:
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Lint with pylint
run: poetry run pylint seafile_mirror
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Test formatting with isort and black
run: |
poetry run isort --check seafile_mirror/
poetry run black .
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Test typing with mypy
run: poetry run mypy

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to PyPI
- name: Build and publish to pypi
uses: https://github.com/JRubics/poetry-publish@v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}

View File

@@ -1,19 +0,0 @@
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
#
# SPDX-License-Identifier: Apache-2.0
name: REUSE Compliance
on:
push:
branches:
- main
pull_request:
jobs:
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check REUSE Compliance
uses: https://github.com/fsfe/reuse-action@v2

View File

@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: Apache-2.0
name: Selftests
name: Test suites
on:
push:
@@ -29,7 +29,7 @@ jobs:
seafile-mirror --help
# Run tool and sync a test library
test-sync:
selftest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -55,3 +55,41 @@ jobs:
run: poetry run seafile-mirror -c tests -v
- name: Attempt to find expected string in library
run: grep "__ci_test_expect__" tests/ci-test/testfile.txt
# PYLINT / BLACK / ISORT / MYPY
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Lint with pylint
run: poetry run pylint seafile_mirror
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Test formatting with isort and black
run: |
poetry run isort --check seafile_mirror/
poetry run black .
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Test typing with mypy
run: poetry run mypy
# REUSE COMPLIANCE
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check REUSE Compliance
uses: https://github.com/fsfe/reuse-action@v2

View File

@@ -4,7 +4,7 @@
[tool.poetry]
name = "seafile-mirror"
version = "0.2.0"
version = "0.1.0"
description = "Handle clean read-only (re-)syncs of Seafile libraries to mirror them"
authors = ["Max Mehl <mail@mehl.mx>"]
license = "Apache-2.0"