Compare commits

13 Commits

Author SHA1 Message Date
9443255911 test whether string test can fail
Some checks failed
Test suites / test-build-install (pull_request) Successful in 28s
Test suites / selftest (pull_request) Failing after 53s
Test suites / pylint (pull_request) Failing after 29s
Test suites / formatting (pull_request) Successful in 27s
Test suites / mypy (pull_request) Successful in 28s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 15:42:53 +01:00
1abf7ddd08 start seaf-cli daemon
Some checks failed
Test suites / test-build-install (pull_request) Successful in 27s
Test suites / selftest (pull_request) Successful in 54s
Test suites / pylint (pull_request) Failing after 31s
Test suites / formatting (pull_request) Successful in 27s
Test suites / mypy (pull_request) Successful in 27s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 15:39:40 +01:00
64af877b51 configure seaf-cli
Some checks failed
Test suites / test-build-install (pull_request) Successful in 26s
Test suites / pylint (pull_request) Has been cancelled
Test suites / formatting (pull_request) Has been cancelled
Test suites / mypy (pull_request) Has been cancelled
Test suites / reuse (pull_request) Has been cancelled
Test suites / selftest (pull_request) Has been cancelled
2024-01-16 15:36:30 +01:00
870fe312d7 install seaf-cli
Some checks failed
Test suites / test-build-install (pull_request) Successful in 26s
Test suites / selftest (pull_request) Failing after 37s
Test suites / pylint (pull_request) Failing after 28s
Test suites / formatting (pull_request) Successful in 25s
Test suites / mypy (pull_request) Successful in 27s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 15:20:31 +01:00
91e4a622ad setup sync of test library
Some checks failed
Test suites / test-build-install (pull_request) Successful in 26s
Test suites / selftest (pull_request) Failing after 24s
Test suites / pylint (pull_request) Failing after 29s
Test suites / formatting (pull_request) Successful in 26s
Test suites / mypy (pull_request) Successful in 27s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 15:17:53 +01:00
50f6064fa8 add step for test build and install
Some checks failed
Test suites / test-build-install (pull_request) Successful in 29s
Test suites / selftest (pull_request) Successful in 25s
Test suites / pylint (pull_request) Failing after 29s
Test suites / formatting (pull_request) Successful in 26s
Test suites / mypy (pull_request) Successful in 25s
Test suites / reuse (pull_request) Successful in 5s
2024-01-16 14:54:40 +01:00
83567afa2a fix runner
Some checks failed
Test suites / selftest (pull_request) Successful in 26s
Test suites / pylint (pull_request) Failing after 35s
Test suites / formatting (pull_request) Successful in 26s
Test suites / mypy (pull_request) Successful in 27s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 14:52:00 +01:00
fb26f5b723 extend tests
Some checks failed
Test suites / selftest (pull_request) Successful in 24s
Test suites / reuse (pull_request) Successful in 6s
Test suites / pylint (pull_request) Has been cancelled
Test suites / formatting (pull_request) Has been cancelled
Test suites / mypy (pull_request) Has been cancelled
2024-01-16 14:49:25 +01:00
c53532efc7 using extra action again
All checks were successful
Test suites / selftest (pull_request) Successful in 24s
Test suites / reuse (pull_request) Successful in 5s
2024-01-16 14:42:58 +01:00
5b0ff38265 install package inside step
All checks were successful
Test suites / selftest (pull_request) Successful in 23s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 14:40:59 +01:00
4a612f81ad fix action path
Some checks failed
Test suites / selftest (pull_request) Failing after 24s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 14:35:35 +01:00
781575468b fix REUSE and action path
Some checks failed
Test suites / selftest (pull_request) Failing after 5s
Test suites / reuse (pull_request) Successful in 6s
2024-01-16 14:30:41 +01:00
9bbd95396c add some first CI tests and pilots
Some checks failed
Test suites / selftest (pull_request) Failing after 5s
Test suites / reuse (pull_request) Failing after 17s
2024-01-16 14:28:45 +01:00
4 changed files with 159 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2023 DB Systel GmbH
#
# SPDX-License-Identifier: Apache-2.0
name: "Reusable Poetry build workflow"
runs:
using: "composite"
steps:
- name: Install dependencies
run: |
pip install poetry
poetry install --no-interaction
shell: bash

View File

@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
#
# SPDX-License-Identifier: Apache-2.0
name: Python package
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: https://github.com/JRubics/poetry-publish@v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}

111
.gitea/workflows/test.yaml Normal file
View File

@@ -0,0 +1,111 @@
# SPDX-FileCopyrightText: 2023 DB Systel GmbH
#
# SPDX-License-Identifier: Apache-2.0
name: Test suites
on:
push:
branches:
- main
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
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pip install poetry
- name: Build package
run: poetry build
- name: Install package
run: pip3 install dist/seafile_mirror-*.tar.gz
- name: Run package
run: seafile-mirror --help
# Run tool and sync a test library
selftest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.gitea/actions/poetrybuild
- name: Install seaf-cli
run: |
apt-get update
apt-get install -y seafile-cli
- name: Configure seaf-cli and start daemon
run: |
seaf-cli init -d /tmp
seaf-cli start
- name: Fill configuration for test library
run: |
sed -i "s|__seafile_server__|${{ secrets.SEAFILE_SERVER }}|" tests/seafile_mirror.conf.yaml
sed -i "s|__seafile_user__|${{ secrets.SEAFILE_USER }}|" tests/seafile_mirror.conf.yaml
sed -i "s|__seafile_pass__|${{ secrets.SEAFILE_PASS }}|" tests/seafile_mirror.conf.yaml
- 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
# 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

@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
#
# SPDX-License-Identifier: Apache-2.0
# Example configuration file for seafile-mirror
- server: __seafile_server__
user: __seafile_user__
password: __seafile_pass__
# The default resync interval
resync_interval_days: 7
# Define the libraries which shall be synced
libs:
- name: ci-test
# ID of the Seafile library (can be seen in the web UI)
id: 558667f5-cee2-443d-8f8e-668e70a23e9f
# local directory where the mirror shall be created
dir: tests/ci-test