From a95a8c0a5bd1ca1db09fc6d429de2071dd236a10 Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Fri, 16 Feb 2024 19:07:16 -0500 Subject: [PATCH] Use Windows runner --- .github/workflows/ci_cd.yml | 39 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1d8ee502..d25cb5de 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -14,27 +14,40 @@ on: jobs: code-style: name: "Code style" - runs-on: ubuntu-latest - container: - image: python:3.10 - volumes: - - /tmp/keytabs:/tmp/keytabs + runs-on: windows-latest steps: - name: "Install Git and clone project" uses: actions/checkout@v4 - - name: "Configure host kerberos" + - name: "Set up Python" + uses: ansys/actions/_setup-python@main + with: + python-version: "3.10" + + - name: "Create virtual environment" run: | - apt update - export DEBIAN_FRONTEND=noninteractive - apt install -yq krb5-user git + python -m pip install --upgrade pip + python -m venv .venv - - name: "Install project and run pre-commit" - shell: bash + - name: "Install project" + if: inputs.skip-install == 'false' run: | - python -m pip install poetry pre-commit + .venv/scripts/activate + python -m pip install poetry python -m poetry install - python -m poetry run -- pre-commit run --all-files --show-diff-on-failure + + - name: "Install pre-commit" + shell: bash + run: | + source .venv/scripts/activate + python -m pip install pre-commit + pre-commit install + + - name: "Run pre-commit" + shell: bash + run: | + source .venv/scripts/activate + pre-commit run --all-files --show-diff-on-failure # - uses: ansys/actions/code-style@v5.1 # with: