Skip to content

Commit

Permalink
Have actions/checkout do the full fetch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Sep 11, 2023
1 parent 415a8eb commit 4eef3ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4eef3ec

Please sign in to comment.