mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
fix linter
This commit is contained in:
parent
4437209232
commit
2fbd141964
3 changed files with 10 additions and 101 deletions
38
.github/workflows/package_linter.yml
vendored
38
.github/workflows/package_linter.yml
vendored
|
@ -1,38 +0,0 @@
|
|||
name: YunoHost apps package linter
|
||||
|
||||
on:
|
||||
# Allow to manually trigger the workflow
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install toml
|
||||
|
||||
- name: 'Clone YunoHost apps package linter'
|
||||
run: |
|
||||
git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter
|
||||
|
||||
- name: 'Install requirements'
|
||||
run: pip3 install toml
|
||||
|
||||
- name: 'Run linter'
|
||||
run: |
|
||||
~/package_linter/package_linter.py .
|
56
.github/workflows/pytest.yml
vendored
56
.github/workflows/pytest.yml
vendored
|
@ -1,56 +0,0 @@
|
|||
name: pytest
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
python-version: ["3.11", "3.10", "3.9"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: 'fetch master'
|
||||
run: |
|
||||
git fetch origin master
|
||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '${{ matrix.python-version }}'
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/
|
||||
key: dot-cache-files
|
||||
|
||||
- name: 'Install package'
|
||||
run: |
|
||||
pip3 install poetry
|
||||
make install
|
||||
|
||||
- name: 'List installed packages'
|
||||
run: |
|
||||
poetry run pip freeze
|
||||
|
||||
- name: 'Run tests with Python v${{ matrix.python-version }}'
|
||||
run: |
|
||||
make pytest
|
||||
|
||||
- name: 'Run Safety check'
|
||||
run: |
|
||||
make safety
|
||||
|
||||
- name: 'Upload coverage report'
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
|
@ -3,17 +3,16 @@ packaging_format = 2
|
|||
|
||||
id = "django_example"
|
||||
name = "Django Example"
|
||||
description.en = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
|
||||
description.en = "Application demonstrating the integration of a Django project under YunoHost"
|
||||
description.fr = "Application démontrant l'intégration d'un projet Django sous YunoHost"
|
||||
|
||||
version = "0.2.0~ynh2"
|
||||
|
||||
maintainers = ["Jens Diemer"]
|
||||
|
||||
|
||||
[upstream]
|
||||
# https://yunohost.org/en/packaging_manifest#upstream-section
|
||||
license = "GPL-3.0"
|
||||
website = "https://github.com/YunoHost-Apps/django_example_ynh"
|
||||
admindoc = "https://github.com/YunoHost-Apps/django_example_ynh"
|
||||
userdoc = "https://github.com/jedie/django-example"
|
||||
code = "https://github.com/YunoHost-Apps/django_example_ynh"
|
||||
|
@ -21,14 +20,14 @@ code = "https://github.com/YunoHost-Apps/django_example_ynh"
|
|||
|
||||
[integration]
|
||||
# https://yunohost.org/en/packaging_manifest#integration-section
|
||||
yunohost = ">=11"
|
||||
yunohost = ">=11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = true
|
||||
sso = true
|
||||
disk = "50M" # **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
|
||||
ram.build = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
|
||||
[install]
|
||||
|
@ -42,6 +41,10 @@ ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G,
|
|||
type = "path"
|
||||
default = "/django_example_ynh"
|
||||
|
||||
[install.init_main_permission]
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[install.admin]
|
||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
||||
type = "user"
|
||||
|
|
Loading…
Reference in a new issue