2020-12-09 20:43:47 +01:00
|
|
|
name: YunoHost apps package linter
|
|
|
|
|
|
|
|
on:
|
2022-12-21 22:21:42 +01:00
|
|
|
# Allow to manually trigger the workflow
|
|
|
|
workflow_dispatch:
|
2021-11-22 19:59:56 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2020-12-09 20:43:47 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '0 8 * * *'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-12-21 22:21:42 +01:00
|
|
|
- uses: actions/checkout@v3
|
2023-08-17 21:55:12 +02:00
|
|
|
# https://github.com/marketplace/actions/checkout
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-12-21 22:21:42 +01:00
|
|
|
|
2023-08-17 21:55:12 +02:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
# https://github.com/marketplace/actions/cache
|
2022-12-21 22:21:42 +01:00
|
|
|
with:
|
2023-08-17 21:55:12 +02:00
|
|
|
path: ~/.cache/
|
|
|
|
key: dot-cache-files
|
2022-12-21 22:21:42 +01:00
|
|
|
|
2023-08-17 21:55:12 +02:00
|
|
|
- name: 'Install dependencies'
|
2022-12-21 22:21:42 +01:00
|
|
|
run: |
|
|
|
|
pip install toml
|
2020-12-09 20:43:47 +01:00
|
|
|
|
2023-08-17 21:55:12 +02:00
|
|
|
- name: 'Clone YunoHost apps package linter'
|
2020-12-09 20:43:47 +01:00
|
|
|
run: |
|
|
|
|
git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter
|
|
|
|
|
2023-08-17 21:55:12 +02:00
|
|
|
- name: 'Install requirements'
|
|
|
|
run: |
|
|
|
|
pip3 install toml
|
|
|
|
|
|
|
|
- name: 'Run linter'
|
2020-12-09 20:43:47 +01:00
|
|
|
run: |
|
|
|
|
~/package_linter/package_linter.py .
|