From 4eef3ecd5b2eb65f1e98457a35df8700166f67b0 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 11 Sep 2023 00:41:04 -0400 Subject: [PATCH] Have actions/checkout do the full fetch Setting the "fetch-depth" to 0 does a deep (i.e., ordinary) fetch, fetching all commits and tags. Setting "submodules" to "recursive" clones and checks out all submodules. These options allow commands that were doing those things to be removed from the later steps. --- .github/workflows/cygwin-test.yml | 6 ++---- .github/workflows/pythonpackage.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml index 2e2e6d12d..533022b91 100644 --- a/.github/workflows/cygwin-test.yml +++ b/.github/workflows/cygwin-test.yml @@ -22,7 +22,8 @@ jobs: - uses: actions/checkout@v4 with: - fetch-depth: 9999 + fetch-depth: 0 + submodules: recursive - uses: cygwin/cygwin-install-action@v4 with: @@ -41,9 +42,6 @@ jobs: - name: Prepare this repo for tests run: | set -x - - /usr/bin/git submodule update --init --recursive - /usr/bin/git fetch --tags TRAVIS=yes ./init-tests-after-clone.sh - name: Further prepare git configuration for tests diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 9f15ceb2e..cce39d17a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -24,7 +24,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 9999 + fetch-depth: 0 + submodules: recursive - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -41,9 +42,6 @@ jobs: - name: Prepare this repo for tests run: | set -x - - git submodule update --init --recursive - git fetch --tags --force TRAVIS=yes ./init-tests-after-clone.sh - name: Prepare git configuration for tests