Skip to content

Commit 1ba2fd8

Browse files
committed
only run command before building soundness checks
1 parent cfcfce9 commit 1ba2fd8

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

.github/workflows/soundness.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on:
6363
type: boolean
6464
description: "Boolean to enable the Python lint check job. Defaults to true."
6565
default: true
66-
linux_pre_run_command:
66+
linux_pre_build_command:
6767
type: string
6868
description: "Linux command to execute before building the Swift package"
6969
default: ""
@@ -90,9 +90,9 @@ jobs:
9090
- name: Mark the workspace as safe
9191
# https://github.com/actions/checkout/issues/766
9292
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
93-
- name: Pre-run setup
94-
if: ${{ inputs.linux_pre_run_command }}
95-
run: ${{ inputs.linux_pre_run_command }}
93+
- name: Pre-build
94+
if: ${{ inputs.linux_pre_build_command }}
95+
run: ${{ inputs.linux_pre_build_command }}
9696
- name: Run API breakage check
9797
run: |
9898
git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
@@ -111,9 +111,9 @@ jobs:
111111
with:
112112
persist-credentials: false
113113
submodules: true
114-
- name: Pre-run setup
115-
if: ${{ inputs.linux_pre_run_command }}
116-
run: ${{ inputs.linux_pre_run_command }}
114+
- name: Pre-build
115+
if: ${{ inputs.linux_pre_build_command }}
116+
run: ${{ inputs.linux_pre_build_command }}
117117
- name: Run documentation check
118118
run: |
119119
apt-get -qq update && apt-get -qq -y install curl yq
@@ -130,9 +130,6 @@ jobs:
130130
with:
131131
persist-credentials: false
132132
submodules: true
133-
- name: Pre-run setup
134-
if: ${{ inputs.linux_pre_run_command }}
135-
run: ${{ inputs.linux_pre_run_command }}
136133
- name: Run unacceptable language check
137134
env:
138135
UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}}
@@ -149,9 +146,6 @@ jobs:
149146
with:
150147
persist-credentials: false
151148
submodules: true
152-
- name: Pre-run setup
153-
if: ${{ inputs.linux_pre_run_command }}
154-
run: ${{ inputs.linux_pre_run_command }}
155149
- name: Run license header check
156150
env:
157151
PROJECT_NAME: ${{ inputs.license_header_check_project_name }}
@@ -168,9 +162,6 @@ jobs:
168162
with:
169163
persist-credentials: false
170164
submodules: true
171-
- name: Pre-run setup
172-
if: ${{ inputs.linux_pre_run_command }}
173-
run: ${{ inputs.linux_pre_run_command }}
174165
- name: Run broken symlinks check
175166
run: curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-broken-symlinks.sh | bash
176167

@@ -190,9 +181,6 @@ jobs:
190181
- name: Mark the workspace as safe
191182
# https://github.com/actions/checkout/issues/766
192183
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
193-
- name: Pre-run setup
194-
if: ${{ inputs.linux_pre_run_command }}
195-
run: ${{ inputs.linux_pre_run_command }}
196184
- name: Run format check
197185
run: |
198186
apt-get -qq update && apt-get -qq -y install curl
@@ -214,9 +202,6 @@ jobs:
214202
- name: Mark the workspace as safe
215203
# https://github.com/actions/checkout/issues/766
216204
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
217-
- name: Pre-run setup
218-
if: ${{ inputs.linux_pre_run_command }}
219-
run: ${{ inputs.linux_pre_run_command }}
220205
- name: Run shellcheck
221206
run: |
222207
apt-get -qq update && apt-get -qq -y install shellcheck
@@ -233,9 +218,6 @@ jobs:
233218
with:
234219
persist-credentials: false
235220
submodules: true
236-
- name: Pre-run setup
237-
if: ${{ inputs.linux_pre_run_command }}
238-
run: ${{ inputs.linux_pre_run_command }}
239221
- name: Run yamllint
240222
run: |
241223
which yamllint >/dev/null || ( apt-get update && apt-get install -y yamllint )
@@ -257,9 +239,6 @@ jobs:
257239
with:
258240
persist-credentials: false
259241
submodules: true
260-
- name: Pre-run setup
261-
if: ${{ inputs.linux_pre_run_command }}
262-
run: ${{ inputs.linux_pre_run_command }}
263242
- name: Run flake8
264243
run: |
265244
pip3 install flake8 flake8-import-order

0 commit comments

Comments
 (0)