From e0cf70e2232ebf90acee445477ac817d68f4d5f1 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 13 Oct 2023 11:23:11 +0300 Subject: [PATCH] Use `fetch-depth: 0` - it adds just 1sec more Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/GithubActionTests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/GithubActionTests.yml b/.github/workflows/GithubActionTests.yml index 0f59a37ca7..bb319d1a28 100644 --- a/.github/workflows/GithubActionTests.yml +++ b/.github/workflows/GithubActionTests.yml @@ -17,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: set path run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH @@ -42,8 +44,7 @@ jobs: run: | eval "$(conda shell.bash hook)" conda activate bioconda - git fetch origin master:refs/remotes/origin/master - if git diff --name-only HEAD..origin/master | grep -vE ^docs; then + 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 echo "Skipping pytest - only docs modified" @@ -53,6 +54,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: set path run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH @@ -71,8 +74,7 @@ jobs: run: | eval "$(conda shell.bash hook)" conda activate bioconda - git fetch origin master:refs/remotes/origin/master - if git diff --name-only HEAD..origin/master | grep -vE ^docs; then + 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 echo "Skipping pytest - only docs modified"