diff --git a/.github/ci-code-quality.yml b/.github/ci-code-quality.yml new file mode 100644 index 0000000..190a8a5 --- /dev/null +++ b/.github/ci-code-quality.yml @@ -0,0 +1,57 @@ +# Continuous Integration (CI) and Code Quality Workflow + +name: CI +on: [push] +jobs: + test: + strategy: + fail-fast: false + matrix: + python-version: [3.12.0] + poetry-version: [1.7.0] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Run image + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install dependencies + run: poetry install + - name: Run tests + run: poetry run pytest + code-quality: + strategy: + fail-fast: false + matrix: + python-version: [3.12.0] + poetry-version: [1.7.0] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Run image + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install dependencies + run: poetry install + - name: Run black + run: poetry run black . --check + - name: Run isort + run: poetry run isort . --check-only --profile black + - name: Run flake8 + run: poetry run flake8 . + - name: Run bandit + run: poetry run bandit . + - name: Run safety + run: poetry run safety check + +