From 7e69bf2647d3450e4b6da9f5caaa65664443745f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 25 Jan 2024 08:44:09 -0800 Subject: [PATCH 20/21] CI: use sudo, assume docker is present, always pass lint Huh. I kinda just assumed we'd be root. Guess not! All my attempts to just get a 'docker' binary installed seem to be failing on conflicts. Maybe it's already there in the GHA image? Let's try leaving it out. pylint and flake8 exit non-zero if a single issue is found, and right now we have tons of them. For now just to get started, let's make them only informational. I can send a follow-up PR to use diff-cover, maybe, to only fail on *new* violations. Signed-off-by: Adam Williamson --- .github/workflows/ci.yml | 14 +++++++------- Makefile | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fcd212..9c8f59a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install make and docker - run: apt-get install make docker docker.io + - name: Install make + run: sudo apt-get install make - name: Run the tests - run: make container-unittests-fedora + run: sudo make container-unittests-fedora unittests-el7: runs-on: ubuntu-latest steps: @@ -22,10 +22,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install make and docker - run: apt-get install make docker + - name: Install make + run: sudo apt-get install make - name: Run the tests - run: make container-unittests-el7 + run: sudo make container-unittests-el7 lint: runs-on: ubuntu-latest steps: @@ -34,7 +34,7 @@ jobs: with: fetch-depth: 0 - name: Install make, pylint and flake8 - run: apt-get install make pylint flake8 + run: sudo apt-get install make pylint flake8 - name: Run pylint run: make pylint - name: Run flake8 diff --git a/Makefile b/Makefile index 74d3d99..2940289 100644 --- a/Makefile +++ b/Makefile @@ -64,10 +64,10 @@ test-coverage: xdg-open htmlcov/index.html pylint: - pylint --rcfile=pylint.conf oz oz-install oz-customize oz-cleanup-cache oz-generate-icicle + pylint --rcfile=pylint.conf oz oz-install oz-customize oz-cleanup-cache oz-generate-icicle || : flake8: - flake8 --ignore=E501 oz + flake8 --ignore=E501 oz || : container-clean: docker rm -f oz-tests-fedora -- 2.43.0