2020-12-12 19:37:20 +01:00
|
|
|
name: YunoHost apps package linter
|
|
|
|
|
|
|
|
on:
|
2023-04-04 14:21:04 +02:00
|
|
|
# Allow to manually trigger the workflow
|
|
|
|
workflow_dispatch:
|
2021-10-10 14:35:06 +02:00
|
|
|
push:
|
2021-10-10 14:38:40 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2021-10-10 14:35:06 +02:00
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 8 * * *'
|
2020-12-12 19:37:20 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-04-04 14:21:04 +02:00
|
|
|
- uses: actions/checkout@v3
|
2020-12-12 19:37:20 +01:00
|
|
|
|
2023-11-09 20:37:13 +01:00
|
|
|
- name: Set up Python
|
2024-08-25 15:37:43 +02:00
|
|
|
uses: actions/setup-python@v5
|
2023-04-03 09:03:48 +02:00
|
|
|
with:
|
2024-08-25 15:37:43 +02:00
|
|
|
python-version: '3.11'
|
2023-04-03 09:03:48 +02:00
|
|
|
|
2023-11-09 20:37:13 +01:00
|
|
|
- name: Install dependencies
|
2020-12-12 19:37:20 +01:00
|
|
|
run: |
|
2023-11-09 20:37:13 +01:00
|
|
|
python -m pip install --upgrade pip
|
2023-04-04 14:21:04 +02:00
|
|
|
pip install toml
|
2020-12-12 19:37:20 +01:00
|
|
|
|
2023-04-04 14:21:04 +02:00
|
|
|
- name: 'Clone YunoHost apps package linter'
|
2023-04-03 09:03:48 +02:00
|
|
|
run: |
|
2023-04-04 14:21:04 +02:00
|
|
|
git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter
|
2023-04-03 09:03:48 +02:00
|
|
|
|
2023-11-09 20:37:13 +01:00
|
|
|
- name: 'Install requirements'
|
|
|
|
run: pip3 install toml
|
|
|
|
|
2020-12-12 19:37:20 +01:00
|
|
|
- name: 'Run linter'
|
|
|
|
run: |
|
|
|
|
~/package_linter/package_linter.py .
|