From 00b73a381910d0efaf8a246878e7706fa77a2761 Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 10 Sep 2021 15:12:45 +0200 Subject: [PATCH] Add CI linting job Use a single lint job Run linting inside a container --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bab069b74..f8181bf31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,6 +96,31 @@ jobs: cd airtime_mvc/tests php ../../vendor/bin/phpunit + # Start lint the code without failing the entire workflow, should be merged + # into 'test' when the entire matrix succeeds. + lint: + runs-on: ubuntu-latest + container: ghcr.io/libretime/libretime-dev:buster + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Lint + run: | + make -C api lint + make -C python_apps/airtime_analyzer lint + make -C python_apps/airtime-celery lint + make -C python_apps/api_clients lint + make -C python_apps/pypo lint + test: runs-on: ubuntu-latest strategy: