fix linter

This commit is contained in:
ericgaspar 2023-08-25 22:41:40 +02:00
parent 4437209232
commit 2fbd141964
3 changed files with 10 additions and 101 deletions

View file

@ -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 .

View file

@ -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

View file

@ -3,17 +3,16 @@ packaging_format = 2
id = "django_example" id = "django_example"
name = "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" version = "0.2.0~ynh2"
maintainers = ["Jens Diemer"] maintainers = ["Jens Diemer"]
[upstream] [upstream]
# https://yunohost.org/en/packaging_manifest#upstream-section # https://yunohost.org/en/packaging_manifest#upstream-section
license = "GPL-3.0" license = "GPL-3.0"
website = "https://github.com/YunoHost-Apps/django_example_ynh"
admindoc = "https://github.com/YunoHost-Apps/django_example_ynh" admindoc = "https://github.com/YunoHost-Apps/django_example_ynh"
userdoc = "https://github.com/jedie/django-example" userdoc = "https://github.com/jedie/django-example"
code = "https://github.com/YunoHost-Apps/django_example_ynh" code = "https://github.com/YunoHost-Apps/django_example_ynh"
@ -21,14 +20,14 @@ code = "https://github.com/YunoHost-Apps/django_example_ynh"
[integration] [integration]
# https://yunohost.org/en/packaging_manifest#integration-section # https://yunohost.org/en/packaging_manifest#integration-section
yunohost = ">=11" yunohost = ">=11.2"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = true ldap = true
sso = true sso = true
disk = "50M" # **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... disk = "50M"
ram.build = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.build = "50M"
ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.runtime = "50M"
[install] [install]
@ -42,6 +41,10 @@ ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G,
type = "path" type = "path"
default = "/django_example_ynh" default = "/django_example_ynh"
[install.init_main_permission]
type = "group"
default = "visitors"
[install.admin] [install.admin]
# this is a generic question - ask strings are automatically handled by Yunohost's core # this is a generic question - ask strings are automatically handled by Yunohost's core
type = "user" type = "user"