From 08a41217373650b3e21c9af8162e2383112743a0 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Wed, 15 May 2024 16:14:07 +0000 Subject: [PATCH 1/2] Export test data to file and validate it Signed-off-by: Olivier FAURAX --- .github/workflows/ci.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0b72ed4..cf11282 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,12 +39,17 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "${{matrix.python-version}}" - - name: Basic cli test on Python ${{matrix.python-version}} + - name: Test on Python ${{matrix.python-version}}, ${{matrix.os-version}} run: | pip install . packet-hardware --help - sudo apt-get install ipmitool smartmontools - packet-hardware inventory -d -u localhost + sudo apt-get install ipmitool smartmontools jq + packet-hardware inventory -d -u localhost -c cache.json + cat cache.json + # Verify there is at least one ProcessorComponent + jq -e '.[] | select(.component_type == "ProcessorComponent")' cache.json + # Verify there is at least one DiskComponent + jq -e '.[] | select(.component_type == "DiskComponent")' cache.json build-and-publish-docker-image: name: build image and possibly push image to quay.io From 3dfbdd88d486c80384e90192b0bbcebac58b14f3 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Thu, 16 May 2024 07:29:00 +0000 Subject: [PATCH 2/2] Test on several python/OS versions Signed-off-by: Olivier FAURAX --- .github/workflows/ci.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf11282..b68756b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,6 @@ jobs: - run: pylama packethardware setup.py cli-test: - runs-on: ubuntu-latest strategy: matrix: python-version: @@ -34,6 +33,17 @@ jobs: - "3.9" - "3.10" - "3.11" + os-version: + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 + - ubuntu-latest + exclude: + - os-version: ubuntu-24.04 + python-version: "3.7" + - os-version: ubuntu-24.04 + python-version: "3.8" + runs-on: ${{matrix.os-version}} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -43,6 +53,8 @@ jobs: run: | pip install . packet-hardware --help + # apt update to use same versions as OSIE + sudo apt-get update sudo apt-get install ipmitool smartmontools jq packet-hardware inventory -d -u localhost -c cache.json cat cache.json