diff --git a/.github/labeler.yml b/.github/labeler.yml index 7e87c1a6a3..a26abc983e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -57,6 +57,11 @@ provider/cloudflare: - any-glob-to-any-file: "prowler/providers/cloudflare/**" - any-glob-to-any-file: "tests/providers/cloudflare/**" +provider/openstack: + - changed-files: + - any-glob-to-any-file: "prowler/providers/openstack/**" + - any-glob-to-any-file: "tests/providers/openstack/**" + github_actions: - changed-files: - any-glob-to-any-file: ".github/workflows/*" @@ -77,6 +82,7 @@ mutelist: - any-glob-to-any-file: "prowler/providers/oraclecloud/lib/mutelist/**" - any-glob-to-any-file: "prowler/providers/alibabacloud/lib/mutelist/**" - any-glob-to-any-file: "prowler/providers/cloudflare/lib/mutelist/**" + - any-glob-to-any-file: "prowler/providers/openstack/lib/mutelist/**" - any-glob-to-any-file: "tests/lib/mutelist/**" - any-glob-to-any-file: "tests/providers/aws/lib/mutelist/**" - any-glob-to-any-file: "tests/providers/azure/lib/mutelist/**" @@ -87,6 +93,7 @@ mutelist: - any-glob-to-any-file: "tests/providers/oraclecloud/lib/mutelist/**" - any-glob-to-any-file: "tests/providers/alibabacloud/lib/mutelist/**" - any-glob-to-any-file: "tests/providers/cloudflare/lib/mutelist/**" + - any-glob-to-any-file: "tests/providers/openstack/lib/mutelist/**" integration/s3: - changed-files: diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index b49ffd39f5..20e4ebd061 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -414,6 +414,30 @@ jobs: flags: prowler-py${{ matrix.python-version }}-oraclecloud files: ./oraclecloud_coverage.xml + # OpenStack Provider + - name: Check if OpenStack files changed + if: steps.check-changes.outputs.any_changed == 'true' + id: changed-openstack + uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1 + with: + files: | + ./prowler/**/openstack/** + ./tests/**/openstack/** + ./poetry.lock + + - name: Run OpenStack tests + if: steps.changed-openstack.outputs.any_changed == 'true' + run: poetry run pytest -n auto --cov=./prowler/providers/openstack --cov-report=xml:openstack_coverage.xml tests/providers/openstack + + - name: Upload OpenStack coverage to Codecov + if: steps.changed-openstack.outputs.any_changed == 'true' + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + flags: prowler-py${{ matrix.python-version }}-openstack + files: ./openstack_coverage.xml + # Lib - name: Check if Lib files changed if: steps.check-changes.outputs.any_changed == 'true'