From d2a83121e4e07a839b6983b7e5d220e507902627 Mon Sep 17 00:00:00 2001 From: Kostas Kyrimis Date: Tue, 15 Oct 2024 12:15:57 +0300 Subject: [PATCH] fix: pre-commit ci workflow (#3917) * fix: pre-commit ci workflow Signed-off-by: kostas --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/test-fakeredis.yml | 11 ++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06f537456..74d2ac8b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,9 @@ jobs: - uses: actions/setup-python@v5 - name: Install dependencies run: | + python -m venv venv + source venv/bin/activate python -m pip install pre-commit - python -m pip freeze --local lsblk -l echo "sda rotational = $(cat /sys/block/sda/queue/rotational)" echo "sdb rotational = $(cat /sys/block/sdb/queue/rotational)" @@ -31,7 +32,9 @@ jobs: path: ~/.cache/pre-commit key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Run pre-commit checks - run: pre-commit run --show-diff-on-failure --color=always --from-ref HEAD^ --to-ref HEAD + run: + source venv/bin/activate + pre-commit run --show-diff-on-failure --color=always --from-ref HEAD^ --to-ref HEAD shell: bash build: strategy: diff --git a/.github/workflows/test-fakeredis.yml b/.github/workflows/test-fakeredis.yml index 29f87ece4..261def70b 100644 --- a/.github/workflows/test-fakeredis.yml +++ b/.github/workflows/test-fakeredis.yml @@ -17,9 +17,6 @@ jobs: options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0" strategy: fail-fast: false - matrix: - PYTHON_VERSION: - - "3.10" name: "Run tests: " permissions: pull-requests: write @@ -39,10 +36,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v5 - with: - cache-dependency-path: tests/fakeredis/poetry.lock - python-version: ${{ matrix.PYTHON_VERSION }} - name: Install dependencies env: @@ -50,7 +43,7 @@ jobs: shell: bash working-directory: tests/fakeredis run: | - python -m pip --quiet install poetry + pip install poetry echo "$HOME/.poetry/bin" >> $GITHUB_PATH poetry install - name: Configure CMake @@ -135,7 +128,7 @@ jobs: - uses: actions/setup-python@v5 with: cache-dependency-path: tests/fakeredis/poetry.lock - python-version: "3.12" + python-version: "3.10" - name: Merge html results run: |