diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 59d16ad5..5c6aef2d 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -24,12 +24,38 @@ jobs: run: | apt update export DEBIAN_FRONTEND=noninteractive - apt install -yq krb5-user lsb_release + apt install -yq krb5-user - - uses: ansys/actions/code-style@v5.1 - with: - skip-install: false - python-version: "3.10" + - name: "Create virtual environment" + shell: bash + run: | + python -m pip install --upgrade pip poetry + python -m venv .venv + + - name: "Install project (if required)" + if: inputs.skip-install == 'false' + shell: bash + run: | + source .venv/bin/activate + python -m poetry install + + - name: "Install pre-commit" + shell: bash + run: | + source .venv/bin/activate + python -m pip install pre-commit + pre-commit install + + - name: "Run pre-commit" + shell: bash + run: | + source .venv/bin/activate + pre-commit run --all-files --show-diff-on-failure + +# - uses: ansys/actions/code-style@v5.1 +# with: +# skip-install: false +# python-version: "3.10" docs-style: name: Documentation Style Check