mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-04-14 16:50:04 +00:00
Compare commits
4 Commits
v5.23
...
PROWLER-XX
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5c652c804 | ||
|
|
189d60a881 | ||
|
|
f29bdddab5 | ||
|
|
a97ddacb82 |
104
.github/workflows/sdk-tests.yml
vendored
104
.github/workflows/sdk-tests.yml
vendored
@@ -15,6 +15,86 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
sdk-tests-aws:
|
||||||
|
if: github.repository == 'prowler-cloud/prowler'
|
||||||
|
runs-on: ubuntu-latest-aws
|
||||||
|
timeout-minutes: 120
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version:
|
||||||
|
- '3.9'
|
||||||
|
- '3.10'
|
||||||
|
- '3.11'
|
||||||
|
- '3.12'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
|
# - name: Check for SDK changes
|
||||||
|
# id: check-changes
|
||||||
|
# uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
|
||||||
|
# with:
|
||||||
|
# files: ./**
|
||||||
|
# files_ignore: |
|
||||||
|
# .github/**
|
||||||
|
# prowler/CHANGELOG.md
|
||||||
|
# docs/**
|
||||||
|
# permissions/**
|
||||||
|
# api/**
|
||||||
|
# ui/**
|
||||||
|
# dashboard/**
|
||||||
|
# mcp_server/**
|
||||||
|
# README.md
|
||||||
|
# mkdocs.yml
|
||||||
|
# .backportrc.json
|
||||||
|
# .env
|
||||||
|
# docker-compose*
|
||||||
|
# examples/**
|
||||||
|
# .gitignore
|
||||||
|
# contrib/**
|
||||||
|
|
||||||
|
- name: Install Poetry
|
||||||
|
# if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
|
run: pipx install poetry==2.1.1
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
# if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: 'poetry'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
# if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
|
run: poetry install --no-root
|
||||||
|
|
||||||
|
# AWS Provider
|
||||||
|
- name: Check if AWS files changed
|
||||||
|
# if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
|
id: changed-aws
|
||||||
|
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./prowler/**/aws/**
|
||||||
|
./tests/**/aws/**
|
||||||
|
./poetry.lock
|
||||||
|
|
||||||
|
- name: Run AWS tests
|
||||||
|
# if: steps.changed-aws.outputs.any_changed == 'true'
|
||||||
|
run: poetry run pytest -n 4 --cov=./prowler/providers/aws --cov-report=xml:aws_coverage.xml tests/providers/aws
|
||||||
|
|
||||||
|
- name: Upload AWS coverage to Codecov
|
||||||
|
# if: steps.changed-aws.outputs.any_changed == 'true'
|
||||||
|
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
with:
|
||||||
|
flags: prowler-py${{ matrix.python-version }}-aws
|
||||||
|
files: ./aws_coverage.xml
|
||||||
|
|
||||||
sdk-tests:
|
sdk-tests:
|
||||||
if: github.repository == 'prowler-cloud/prowler'
|
if: github.repository == 'prowler-cloud/prowler'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -71,30 +151,6 @@ jobs:
|
|||||||
if: steps.check-changes.outputs.any_changed == 'true'
|
if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
run: poetry install --no-root
|
run: poetry install --no-root
|
||||||
|
|
||||||
# AWS Provider
|
|
||||||
- name: Check if AWS files changed
|
|
||||||
if: steps.check-changes.outputs.any_changed == 'true'
|
|
||||||
id: changed-aws
|
|
||||||
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./prowler/**/aws/**
|
|
||||||
./tests/**/aws/**
|
|
||||||
./poetry.lock
|
|
||||||
|
|
||||||
- name: Run AWS tests
|
|
||||||
if: steps.changed-aws.outputs.any_changed == 'true'
|
|
||||||
run: poetry run pytest -n auto --cov=./prowler/providers/aws --cov-report=xml:aws_coverage.xml tests/providers/aws
|
|
||||||
|
|
||||||
- name: Upload AWS coverage to Codecov
|
|
||||||
if: steps.changed-aws.outputs.any_changed == 'true'
|
|
||||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
|
||||||
env:
|
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
with:
|
|
||||||
flags: prowler-py${{ matrix.python-version }}-aws
|
|
||||||
files: ./aws_coverage.xml
|
|
||||||
|
|
||||||
# Azure Provider
|
# Azure Provider
|
||||||
- name: Check if Azure files changed
|
- name: Check if Azure files changed
|
||||||
if: steps.check-changes.outputs.any_changed == 'true'
|
if: steps.check-changes.outputs.any_changed == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user