From 5a57c4318d4a9bed17ebc05844f5bfb0eefcad55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 26 Feb 2024 06:08:20 +0100 Subject: [PATCH] CI: Add job to run lintian on built packages and sources --- .github/workflows/build-deb.yaml | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/build-deb.yaml b/.github/workflows/build-deb.yaml index 092d9abdf..6977aa34e 100644 --- a/.github/workflows/build-deb.yaml +++ b/.github/workflows/build-deb.yaml @@ -31,3 +31,44 @@ jobs: extra-source-build-deps: | ca-certificates git + + run-lintian: + name: Run lintian + needs: build-deb-package + runs-on: ubuntu-latest + + container: + image: ubuntu:devel + + steps: + - name: Prepare container + run: | + set -eu + + echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90aptyes + apt update + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + run-id: ${{ needs.build-deb-package.outputs.run-id }} + + - name: Install dependencies + run: | + apt install lintian + + - name: Create test user + run: | + apt install adduser + adduser --disabled-password --gecos "" tester + chown tester:tester . -R + + - name: Run lintian on source package + run: | + runuser -u tester -- lintian --pedantic --fail-on error \ + ./*-debian-source/${{ needs.build-deb-package.outputs.pkg-name }}_${{ needs.build-deb-package.outputs.pkg-version }}_source.changes + + - name: Run lintian on binary packages + run: | + runuser -u tester -- lintian --pedantic --fail-on error \ + ./*-debian-packages/*_${{ needs.build-deb-package.outputs.pkg-version }}_*.deb