From 901959f33817ef1cd6ea81873ba8514197143a3e Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 13 Oct 2023 10:59:22 +0300 Subject: [PATCH] Fetch the full history of `master` before diff-ing it against HEAD The `Run tests` jobs were broken with https://github.com/bioconda/bioconda-utils/commit/1ae4126c5ba961667bc321c451957a50be305461 The problem is that the project uses `fetch-depth: 1` (the default) and thus has no branch history. Using `fetch-depth: 0` would fetch the whole history for **all** branches and tags, which would be unnecessary. Refs: - https://github.com/actions/checkout/issues/296 - https://github.com/actions/checkout/pull/301 Signed-off-by: Martin Tzvetanov Grigorov (cherry picked from commit e3c24c6cd45b62b35e9eca4f1147321d09eb2ca3) --- .github/workflows/GithubActionTests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/GithubActionTests.yml b/.github/workflows/GithubActionTests.yml index 091b4d5e64..ddd7741ce7 100644 --- a/.github/workflows/GithubActionTests.yml +++ b/.github/workflows/GithubActionTests.yml @@ -42,6 +42,7 @@ jobs: run: | eval "$(conda shell.bash hook)" conda activate bioconda + git fetch origin master:refs/remotes/origin/master if git diff --name-only origin/master...HEAD | grep -vE ^docs; then py.test --durations=0 test/ -v --log-level=DEBUG --tb=native -m '${{ matrix.py_test_marker }}' else @@ -70,6 +71,7 @@ jobs: run: | eval "$(conda shell.bash hook)" conda activate bioconda + git fetch origin master:refs/remotes/origin/master if git diff --name-only origin/master...HEAD | grep -vE ^docs; then py.test --durations=0 test/ -v --log-level=DEBUG -k "not docker" --tb=native else