Skip to content

Commit 701a816

Browse files
committed
place debugging step in wf
1 parent 9220d95 commit 701a816

File tree

1 file changed

+15
-29
lines changed

1 file changed

+15
-29
lines changed

.github/workflows/phantoms.yaml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ jobs:
3636
uses: actions/checkout@v2
3737

3838
- name: Cache Node Posix
39-
if: runner.os != 'Windows'
39+
if: runner.os != 'Windows' && env.ACT != 'true'
4040
uses: actions/cache@v4
4141
with:
4242
path: ~/.npm
4343
key: npm-${{ runner.os }}-${{ env.cache-name }}
4444

4545
- name: Cache Phantoms
46+
if: env.ACT != 'true'
4647
id: phantom-cache
4748
uses: actions/cache@v4
4849
env:
@@ -88,29 +89,26 @@ jobs:
8889
run: npm install -g [email protected]
8990

9091
- name: Collect Phantoms (Linux/macOS)
91-
if: ${{ steps.cache-phantoms.outputs.cache-hit != 'true' && runner.os != 'Windows' }}
92+
if: steps.cache-phantoms.outputs.cache-hit != 'true' && !env.ACT && runner.os != 'Windows'
9293
run: wget -O PHANTOMS.zip https://openneuropet.s3.amazonaws.com/US-sourced-OpenNeuroPET-Phantoms.zip
9394

9495
- name: Collect Phantoms (Windows)
95-
if: ${{ steps.cache-phantoms.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
96+
if: steps.cache-phantoms.outputs.cache-hit != 'true' && !env.ACT && runner.os == 'Windows'
9697
run: Invoke-WebRequest -Uri "https://openneuropet.s3.amazonaws.com/US-sourced-OpenNeuroPET-Phantoms.zip" -OutFile "PHANTOMS.zip"
9798

98-
- name: Decompress phantoms windows
99-
if: ${{ steps.cache-phantoms.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
100-
run: powershell -command "Expand-Archive PHANTOMS.zip -DestinationPath . -Force"
99+
- name: Debug
100+
uses: mxschmitt/action-tmate@v3
101+
if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
102+
timeout-minutes: 15
103+
with:
104+
limit-access-to-actor: true
101105

102-
- name: Debug Windows extraction
103-
if: ${{ steps.cache-phantoms.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
104-
run: |
105-
echo "Contents of OpenNeuroPET-Phantoms directory:"
106-
ls -la OpenNeuroPET-Phantoms/
107-
echo "Contents of sourcedata directory:"
108-
ls -la OpenNeuroPET-Phantoms/sourcedata/
109-
echo "Contents of SiemensHRRT-JHU directory:"
110-
ls -la OpenNeuroPET-Phantoms/sourcedata/SiemensHRRT-JHU/ || echo "SiemensHRRT-JHU directory not found"
106+
- name: Decompress phantoms windows
107+
if: steps.cache-phantoms.outputs.cache-hit != 'true' && !env.ACT && runner.os == 'Windows'
108+
run: powershell -command "Expand-Archive PHANTOMS.zip"
111109

112110
- name: Decompress phantoms posix
113-
if: ${{ steps.cache-phantoms.outputs.cache-hit != 'true' && runner.os != 'Windows' }}
111+
if: steps.cache-phantoms.outputs.cache-hit != 'true' && !env.ACT && runner.os != 'Windows'
114112
run: unzip PHANTOMS.zip
115113

116114
- name: Copy Conversion Scripts from Version Control
@@ -119,12 +117,6 @@ jobs:
119117
cp scripts/matlab_conversions.m OpenNeuroPET-Phantoms/code/matlab_conversions.m
120118
cp scripts/python_conversions.sh OpenNeuroPET-Phantoms/code/python_conversions.sh
121119
122-
- name: Debug
123-
uses: mxschmitt/action-tmate@v3
124-
if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
125-
timeout-minutes: 15
126-
with:
127-
limit-access-to-actor: true
128120
129121
- name: Run Python Conversion Script on Phantoms
130122
run: |
@@ -161,14 +153,8 @@ jobs:
161153
run: |
162154
bids-validator OpenNeuroPET-Phantoms/python
163155
164-
- name: Debug
165-
uses: mxschmitt/action-tmate@v3
166-
if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
167-
timeout-minutes: 15
168-
with:
169-
limit-access-to-actor: true
170156
171157
- name: Validate Matlab Conversion
172-
if: ${{ matrix.os == 'ubuntu-latest' }}
158+
if: ${{ matrix.os == 'ubuntu-latest'}}
173159
run: |
174160
bids-validator OpenNeuroPET-Phantoms/matlab

0 commit comments

Comments
 (0)