Skip to content

Commit 1925b18

Browse files
committed
ci(dependency-review): upload SFW smoke artifacts
1 parent 8f1318e commit 1925b18

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

.github/workflows/dependency-review.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ jobs:
129129
fetch-depth: 1
130130
persist-credentials: false
131131

132+
- name: Prepare SFW artifact directory
133+
run: |
134+
mkdir -p sfw-artifacts
135+
{
136+
echo "mode=firewall-free"
137+
echo "pr=${{ github.event.pull_request.number }}"
138+
echo "sha=${{ github.event.pull_request.head.sha }}"
139+
} > sfw-artifacts/context.txt
140+
132141
- uses: ./.github/actions/setup-sfw
133142
with:
134143
uv: "true"
@@ -138,17 +147,29 @@ jobs:
138147
env:
139148
UV_PYTHON: "3.12"
140149
UV_PYTHON_DOWNLOADS: never
141-
run: sfw uv sync --locked --extra test --extra dev
150+
run: |
151+
set -o pipefail
152+
sfw uv sync --locked --extra test --extra dev 2>&1 | tee sfw-artifacts/sfw-uv-sync.log
142153
143154
- name: Import smoke test
144155
run: |
156+
set -o pipefail
145157
uv run python -c "
146158
import socketdev
147159
from socketdev import socketdev as SocketDevClient
148160
from socketdev.core.api import API
149161
from socketdev.version import __version__
150162
print('import smoke OK', __version__)
151-
"
163+
" 2>&1 | tee sfw-artifacts/import-smoke.log
164+
165+
- name: Upload SFW report artifact
166+
if: always()
167+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
168+
with:
169+
name: socket-firewall-free-${{ github.event.pull_request.number }}
170+
path: sfw-artifacts/
171+
if-no-files-found: warn
172+
retention-days: 14
152173

153174
# Trusted SocketDev members: authenticated enterprise edition. The token is
154175
# scoped to the `socket-firewall` environment, so only this job can read it.
@@ -164,6 +185,15 @@ jobs:
164185
fetch-depth: 1
165186
persist-credentials: false
166187

188+
- name: Prepare SFW artifact directory
189+
run: |
190+
mkdir -p sfw-artifacts
191+
{
192+
echo "mode=firewall-enterprise"
193+
echo "pr=${{ github.event.pull_request.number }}"
194+
echo "sha=${{ github.event.pull_request.head.sha }}"
195+
} > sfw-artifacts/context.txt
196+
167197
- uses: ./.github/actions/setup-sfw
168198
with:
169199
uv: "true"
@@ -177,17 +207,29 @@ jobs:
177207
env:
178208
UV_PYTHON: "3.12"
179209
UV_PYTHON_DOWNLOADS: never
180-
run: sfw uv sync --locked --extra test --extra dev
210+
run: |
211+
set -o pipefail
212+
sfw uv sync --locked --extra test --extra dev 2>&1 | tee sfw-artifacts/sfw-uv-sync.log
181213
182214
- name: Import smoke test
183215
run: |
216+
set -o pipefail
184217
uv run python -c "
185218
import socketdev
186219
from socketdev import socketdev as SocketDevClient
187220
from socketdev.core.api import API
188221
from socketdev.version import __version__
189222
print('import smoke OK', __version__)
190-
"
223+
" 2>&1 | tee sfw-artifacts/import-smoke.log
224+
225+
- name: Upload SFW report artifact
226+
if: always()
227+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
228+
with:
229+
name: socket-firewall-enterprise-${{ github.event.pull_request.number }}
230+
path: sfw-artifacts/
231+
if-no-files-found: warn
232+
retention-days: 14
191233

192234
workflow-notice:
193235
needs: inspect

0 commit comments

Comments
 (0)