From 229dcab97024247a7646467c880b6963c44566be Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Fri, 21 Jul 2023 22:59:56 +0200 Subject: [PATCH] improve ci (#12) --- .github/workflows/release.yaml | 2 +- .github/workflows/test.yml | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c67c391..ea45cd8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,7 @@ jobs: - name: Check if there is a parent commit id: check-parent-commit run: | - echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" + echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_OUTPUT - name: Detect and tag new version id: check-version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8589253..6e2ac17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,28 +25,6 @@ jobs: run: | pip install -r requirements_dev.txt -e . - - name: Compute pre-commit cache key - id: pre-commit-cache - shell: python - run: | - import hashlib - import sys - - python = "py{}.{}".format(*sys.version_info[:2]) - payload = sys.version.encode() + sys.executable.encode() - digest = hashlib.sha256(payload).hexdigest() - result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8]) - - print("::set-output name=result::{}".format(result)) - - - name: Restore pre-commit cache - uses: actions/cache@v3.3.1 - with: - path: ~/.cache/pre-commit - key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} - restore-keys: | - ${{ steps.pre-commit-cache.outputs.result }}- - - name: Run pre-commit run: | pre-commit run --all-files --show-diff-on-failure