Skip to content

Commit a8205f1

Browse files
committed
No fetch depth as parameter
1 parent 401b00f commit a8205f1

8 files changed

+25
-57
lines changed

.github/workflows/dispatched-build.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ on:
2727
required: false
2828
default: ''
2929
type: string
30-
fetch_depth:
31-
description: 'Depth of repo fetch (change if SHA populated)'
32-
required: false
33-
default: 1
34-
type: number
3530
publish_artifacts:
3631
description: 'Publish artifacts'
3732
required: true
@@ -54,15 +49,25 @@ jobs:
5449
BUILD_CONFIG: ${{ inputs.buildConfiguration }}
5550
BUILD_NUMBER: ${{ github.run_number }}
5651
steps:
57-
- name: Checkout repo
52+
- name: Checkout repo (last commit)
53+
if: ${{ inputs.specific_sha == '' || github.reg_type != 'branch' }}
54+
timeout-minutes: 1
55+
uses: actions/checkout@v4
56+
with:
57+
ref: ${{ github.ref_name }}
58+
59+
- name: Checkout repo (last 50 commit)
60+
if: ${{ inputs.specific_sha != '' && github.reg_type == 'branch' }}
5861
timeout-minutes: 1
5962
uses: actions/checkout@v4
6063
with:
61-
fetch-depth: ${{ inputs.fetch_depth }}
64+
ref: ${{ github.ref_name }}
65+
fetch-depth: 50
6266

63-
- name: Manual checkout
64-
if: ${{ inputs.specific_sha != '' }}
65-
run: git checkout ${{ inputs.specific_sha }}
67+
# it leads to detached HEAD, but we don't commit anything anyway
68+
- name: Manual commit checkout if required
69+
if: ${{ inputs.specific_sha != '' && github.reg_type == 'branch' }}
70+
run: git checkout ${{ inputs.specific_sha }}
6671

6772
- name: Build Orm
6873
if: ${{ success() }}

.github/workflows/dispatched-firebird-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on Firebird on dispatch. Run No ${{ github.run_numb
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -47,7 +42,6 @@ jobs:
4742
build_config: Release
4843
target_framework: ${{ matrix.net }}
4944
specific_sha: ${{ inputs.specific_sha }}
50-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
5145
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5246
test_output_verbosity: minimal
5347
test_run_timeout: 40

.github/workflows/dispatched-mssql-tests.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on MS SQL Server on dispatch. Run No ${{ github.run
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -52,7 +47,6 @@ jobs:
5247
build_config: Release
5348
target_framework: ${{ matrix.net }}
5449
specific_sha: ${{ inputs.specific_sha }}
55-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
5650
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5751
test_output_verbosity: minimal
5852
test_run_timeout: 50
@@ -73,7 +67,6 @@ jobs:
7367
build_config: Release
7468
target_framework: ${{ matrix.net }}
7569
specific_sha: ${{ inputs.specific_sha }}
76-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
7770
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7871
test_output_verbosity: minimal
7972
test_run_timeout: 50

.github/workflows/dispatched-mysql5-tests.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on MySQL on dispatch. Run No ${{ github.run_number
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -52,7 +47,6 @@ jobs:
5247
build_config: Release
5348
target_framework: ${{ matrix.net }}
5449
specific_sha: ${{ inputs.specific_sha }}
55-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
5650
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5751
test_output_verbosity: minimal
5852
test_run_timeout: 20
@@ -73,7 +67,6 @@ jobs:
7367
build_config: Release
7468
target_framework: ${{ matrix.net }}
7569
specific_sha: ${{ inputs.specific_sha }}
76-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
7770
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7871
test_output_verbosity: minimal
7972
test_run_timeout: 30

.github/workflows/dispatched-pgsql10-tests.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on PostgreSQL on dispatch. Run No ${{ github.run_nu
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -52,7 +47,6 @@ jobs:
5247
build_config: Release
5348
target_framework: ${{ matrix.net }}
5449
specific_sha: ${{ inputs.specific_sha }}
55-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
5650
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5751
test_output_verbosity: minimal
5852
test_run_timeout: 30
@@ -73,7 +67,6 @@ jobs:
7367
build_config: Release
7468
target_framework: ${{ matrix.net }}
7569
specific_sha: ${{ inputs.specific_sha }}
76-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
7770
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7871
test_output_verbosity: minimal
7972
test_run_timeout: 30

.github/workflows/dispatched-pgsql9-tests.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on PostgreSQL on dispatch. Run No ${{ github.run_nu
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -70,7 +65,6 @@ jobs:
7065
build_config: Release
7166
target_framework: ${{ matrix.net }}
7267
specific_sha: ${{ inputs.specific_sha }}
73-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
7468
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
7569
test_output_verbosity: minimal
7670
test_run_timeout: 30
@@ -91,7 +85,6 @@ jobs:
9185
build_config: Release
9286
target_framework: ${{ matrix.net }}
9387
specific_sha: ${{ inputs.specific_sha }}
94-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
9588
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
9689
test_output_verbosity: minimal
9790
test_run_timeout: 30

.github/workflows/dispatched-sqlite-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ run-name: Run database tests on SQLite on dispatch. Run No ${{ github.run_number
33
on:
44
workflow_dispatch:
55
inputs:
6-
fetch_depth:
7-
description: 'Depth of repo fetch (change if SHA populated)'
8-
required: false
9-
default: 1
10-
type: number
116
specific_sha:
127
description: 'Commit SHA to checkout'
138
required: false
@@ -47,7 +42,6 @@ jobs:
4742
build_config: Release
4843
target_framework: ${{ matrix.net }}
4944
specific_sha: ${{ inputs.specific_sha }}
50-
fetch_depth: ${{ fromJSON(inputs.fetch_depth) }}
5145
show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
5246
test_output_verbosity: minimal
5347
test_run_timeout: 30

.github/workflows/reusable-storage-dependant-tests.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ on:
2323
required: false
2424
default: ''
2525
type: string
26-
fetch_depth:
27-
description: 'Depth of repo fetch (change if SHA populated)'
28-
required: false
29-
default: 1
30-
type: number
3126
show_all_fails:
3227
description: 'No mute tests'
3328
type: boolean
@@ -94,12 +89,20 @@ jobs:
9489
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.20_amd64.deb
9590
sudo dpkg -i libssl1.0.0_1.0.2g-1ubuntu4.20_amd64.deb
9691
97-
- name: Checkout repo
92+
- name: Checkout repo (last commit)
93+
if: ${{ inputs.specific_sha == '' || github.reg_type != 'branch' }}
94+
timeout-minutes: 1
95+
uses: actions/checkout@v4
96+
with:
97+
ref: ${{ github.ref_name }}
98+
99+
- name: Checkout repo (last 50 commit)
100+
if: ${{ inputs.specific_sha != '' && github.reg_type == 'branch' }}
98101
timeout-minutes: 1
99102
uses: actions/checkout@v4
100103
with:
101104
ref: ${{ github.ref_name }}
102-
fetch-depth: ${{ inputs.fetch_depth }}
105+
fetch-depth: 50
103106

104107
# it leads to detached HEAD, but we don't commit anything anyway
105108
- name: Manual commit checkout if required

0 commit comments

Comments
 (0)