From 803102f73356d15110a6c6c9e92bbf38598892ac Mon Sep 17 00:00:00 2001 From: Augustin Trancart Date: Fri, 8 Mar 2024 23:30:18 +0100 Subject: [PATCH] Add package_linter to github actions --- .github/workflows/package_linter.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/package_linter.yml diff --git a/.github/workflows/package_linter.yml b/.github/workflows/package_linter.yml new file mode 100644 index 0000000..6dd11f3 --- /dev/null +++ b/.github/workflows/package_linter.yml @@ -0,0 +1,41 @@ +name: YunoHost apps package linter + +on: + # Allow to manually trigger the workflow + workflow_dispatch: + push: + branches: + - master + - testing + 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: 'Run linter' + run: | + ~/package_linter/package_linter.py . > linter_logs && cat linter_logs + + - name: 'Analyze linter logs' + run: | + grep "Not even a warning\!" linter_logs +