Skip to content

Commit 0b3184e

Browse files
committed
Only run cleanup if respective setup steps were successful
1 parent a792086 commit 0b3184e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ jobs:
113113
114114
- name: Clone Services
115115
if: matrix.os == 'ubuntu-latest'
116+
id: clone-services
116117
run: |
117118
git clone --depth 1 https://github.com/openml/services.git
118119
119120
- name: Start Docker Services
121+
id: start-services
120122
if: matrix.os == 'ubuntu-latest'
121123
working-directory: ./services
122124
run: |
@@ -188,12 +190,12 @@ jobs:
188190
verbose: true
189191

190192
- name: Dump server logs
191-
if: matrix.os == 'ubuntu-latest' && always()
193+
if: always() && steps.start-services.outcome == 'success'
192194
run: |
193195
docker logs openml-php-rest-api -t
194196
195197
- name: Cleanup Docker setup
196-
if: matrix.os == 'ubuntu-latest' && always()
198+
if: always() && steps.clone-services.outcome == 'success'
197199
run: |
198200
sudo rm -rf services
199201

0 commit comments

Comments
 (0)