diff --git a/.gitea/workflows/linting.yaml b/.gitea/workflows/linting.yaml new file mode 100644 index 0000000..06fceab --- /dev/null +++ b/.gitea/workflows/linting.yaml @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: 2023 Max Mehl +# +# 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 diff --git a/.gitea/workflows/reuse.yaml b/.gitea/workflows/reuse.yaml new file mode 100644 index 0000000..294f650 --- /dev/null +++ b/.gitea/workflows/reuse.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2023 Max Mehl +# +# 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 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/selftests.yaml similarity index 63% rename from .gitea/workflows/test.yaml rename to .gitea/workflows/selftests.yaml index 903e9ed..d24823e 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/selftests.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 -name: Test suites +name: Selftests on: push: @@ -55,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