Skip to content

Commit

Permalink
ci: use checkout fetch-depth for setuptools scm
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato committed Sep 25, 2024
1 parent be09254 commit c97251e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
uses: actions/checkout@v4
with:
lfs: true
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -54,10 +53,9 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -174,10 +172,9 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -213,10 +210,9 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit c97251e

Please sign in to comment.