From 27e1b4bf7d89b810694e7cfd6cbe0f045ce911d6 Mon Sep 17 00:00:00 2001 From: gaudinnicolas Date: Wed, 20 Nov 2024 14:48:16 +0100 Subject: [PATCH] ci: reverted pre-commit (previously commited was uncomplete) --- .github/workflows/pre-commit copy.yaml | 25 ------------------------- .github/workflows/pre-commit.yaml | 24 +++++++++--------------- 2 files changed, 9 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/pre-commit copy.yaml diff --git a/.github/workflows/pre-commit copy.yaml b/.github/workflows/pre-commit copy.yaml deleted file mode 100644 index b7e4de9..0000000 --- a/.github/workflows/pre-commit copy.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - branches: [main] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - - name: Install poetry - run: | - python -m pip install poetry - poetry export --with dev --format=requirements.txt --output=requirements.txt - - name: set PY - run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV - - uses: actions/cache@v1 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 7b1cec3..2a113fd 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -8,23 +8,17 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - cache: "poetry" + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install poetry run: | python -m pip install poetry - # poetry export --with dev --format=requirements.txt --output=requirements.txt + poetry export --with dev --format=requirements.txt --output=requirements.txt - name: set PY run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV - # - uses: actions/cache@v4 - # with: - # path: ~/.cache/pre-commit - # key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: pre-commit/action@v3.0.1 - # - uses: pre-commit-ci/lite-action@v1.0.2 - # if: always() + - uses: actions/cache@v1 + with: + path: ~/.cache/pre-commit + key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} + - uses: pre-commit/action@v3.0.0