From b6d7ae30764e466330de836e8a5557f527341d11 Mon Sep 17 00:00:00 2001 From: Theodoros Katzalis Date: Tue, 17 Sep 2024 14:34:44 +0200 Subject: [PATCH] Fix pre-commit ci action --- .github/workflows/ci.yml | 13 ++++++------- conda-recipe/meta.yaml | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e9921c..1a31e127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,6 @@ jobs: defaults: run: shell: bash -l {0} - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -28,13 +26,14 @@ jobs: environment-file: environment.yml channel-priority: flexible miniforge-variant: Miniforge3 + - name: Get the latest commit hash + run: | + echo "COMMIT_HASH=$(git log -1 --format='%H')" >> $GITHUB_ENV - name: Run Pre-Commit run: | - echo $BRANCH_NAME - echo ${{ github.event.pull_request.base.ref }} - echo ${{ github.event.pull_request.head.sha }} - git fetch origin - pre-commit run --from-ref origin/${{ github.event.pull_request.base.ref }} --to-ref ${{ github.event.pull_request.head.sha }} + echo ${{ github.ref_name }} + echo $COMMIT_HASH + pre-commit run --from-ref ${{ github.ref_name }} --to-ref $COMMIT_HASH test-dev: runs-on: ubuntu-latest diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 3afda61c..24da47f7 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -53,6 +53,7 @@ test: - python 3.9.* - pytest - pytest-grpc + - pytest-timeout - cpuonly - ilastik-pytorch-version-helper-cpu imports: