Compare commits

12 Commits

Author SHA1 Message Date
bca361ab95 release version 0.2.0
All checks were successful
Python Linters / formatting (push) Successful in 51s
Python Linters / pylint (push) Successful in 1m0s
REUSE Compliance / reuse (push) Successful in 10s
Python Linters / mypy (push) Successful in 54s
Selftests / test-build-install (push) Successful in 52s
Selftests / test-sync (push) Successful in 1m37s
Python package / build (push) Successful in 1m29s
2024-01-16 17:03:01 +01:00
400db96e3e Merge pull request 'CI tests and publishing' (#10) from ci-test into main
All checks were successful
Python Linters / formatting (push) Successful in 52s
Python Linters / pylint (push) Successful in 1m3s
REUSE Compliance / reuse (push) Successful in 10s
Python Linters / mypy (push) Successful in 57s
Selftests / test-build-install (push) Successful in 55s
Selftests / test-sync (push) Successful in 59s
Reviewed-on: #10
2024-01-16 16:54:02 +01:00
4250475933 add version command
All checks were successful
Python Linters / formatting (pull_request) Successful in 1m17s
Python Linters / mypy (pull_request) Successful in 1m24s
Python Linters / pylint (pull_request) Successful in 1m31s
REUSE Compliance / reuse (pull_request) Successful in 15s
Selftests / test-build-install (pull_request) Successful in 54s
Selftests / test-sync (pull_request) Successful in 1m16s
2024-01-16 16:47:19 +01:00
60455082c2 fix pylint by igoring some errors 2024-01-16 16:47:19 +01:00
86a64570c5 add CI tests and publishing workflows 2024-01-16 16:47:19 +01:00
6d62bcf3ab fix REUSE compliance 2024-01-15 17:22:26 +01:00
7783f88f0e Merge pull request 'chore(deps): update dependency pylint to v3' (#9) from renovate/pylint-3.x into main
Reviewed-on: #9
2024-01-15 17:08:27 +01:00
7ca9442dca chore(deps): update dependency pylint to v3 2024-01-15 16:06:14 +00:00
2c7fd637ff Merge pull request 'chore(deps): update dependency mypy to v1.8.0' (#8) from renovate/mypy-1.x-lockfile into main
Reviewed-on: #8
2024-01-15 17:04:34 +01:00
07550ed290 Merge pull request 'chore(deps): update dependency isort to v5.13.2' (#7) from renovate/isort-5.x-lockfile into main
Reviewed-on: #7
2024-01-15 17:04:28 +01:00
c5e6238e77 chore(deps): update dependency mypy to v1.8.0 2024-01-15 16:02:59 +00:00
7644910bf1 chore(deps): update dependency isort to v5.13.2 2024-01-15 16:02:49 +00:00
8 changed files with 80 additions and 47 deletions

View File

@@ -3,11 +3,17 @@
# SPDX-License-Identifier: Apache-2.0
name: "Reusable Poetry build workflow"
inputs:
poetry_install_args:
default: ""
description: "Value for additional poetry install arguments"
required: false
runs:
using: "composite"
steps:
- name: Install dependencies
run: |
pip install poetry
poetry install --no-interaction
- name: Install poetry
run: pip install poetry
- name: Install poetry package
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
shell: bash

View File

@@ -0,0 +1,41 @@
# 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

@@ -0,0 +1,19 @@
# 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: Test suites
name: Selftests
on:
push:
@@ -29,12 +29,15 @@ jobs:
seafile-mirror --help
# Run tool and sync a test library
selftest:
test-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
# using minimal set of dependencies
with:
poetry_install_args: "--without dev"
- name: Install seaf-cli
run: |
apt-get update
@@ -52,41 +55,3 @@ 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

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ venv/
/seafile_mirror.conf.yaml
__pycache__/
*.log
tests/ci-test/

View File

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

View File

@@ -2,7 +2,8 @@
#
# SPDX-License-Identifier: Apache-2.0
# Example configuration file for seafile-mirror
# Configuration file for seafile-mirror which will be filled in and applied in
# the CI test
- server: __seafile_server__
user: __seafile_user__
password: __seafile_pass__