From addf60b3ee4499a181fc32ffa5a0f1083f5de0e9 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Fri, 24 Feb 2023 11:01:45 +0100 Subject: [PATCH] Pin pytest-cs to a stable tag, cache virtualenvs, don't install ipython in CI (#2075) --- .github/workflows/docker-test.yml | 13 +++++++------ docker/test/Pipfile | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index f9d8f8610..8d4a52033 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -42,17 +42,18 @@ jobs: cd docker/test python -m pip install --upgrade pipenv wheel -# - id: cache-pipenv -# uses: actions/cache@v3 -# with: -# path: ~/.local/share/virtualenvs -# key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} + - name: "Cache virtualenvs" + id: cache-pipenv + uses: actions/cache@v3 + with: + path: ~/.local/share/virtualenvs + key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} - name: "Install dependencies" if: steps.cache-pipenv.outputs.cache-hit != 'true' run: | cd docker/test - pipenv install --deploy --dev + pipenv install --deploy docker network create net-test - name: "Run tests" diff --git a/docker/test/Pipfile b/docker/test/Pipfile index 3bf92d997..7cee77378 100644 --- a/docker/test/Pipfile +++ b/docker/test/Pipfile @@ -1,11 +1,11 @@ [packages] pytest-dotenv = "*" pytest-xdist = "*" -gnureadline = "*" -ipdb = "*" -pytest-cs = {ref = "main", git = "https://github.com/crowdsecurity/pytest-cs.git"} +pytest-cs = {ref = "0.1.0", git = "https://github.com/crowdsecurity/pytest-cs.git"} [dev-packages] +gnureadline = "*" +ipdb = "*" [requires] python_version = "3.10"