Skip to content

Commit 516bcd1

Browse files
maximyurchukMrLolthe1st
authored andcommitted
Move stats collection after tests (ydb-platform#4616)
1 parent 9699097 commit 516bcd1

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/actions/build_and_test_ya/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,17 @@ runs:
130130
fi
131131
132132
exit 1
133-
133+
134+
- name: build_stats
135+
shell: bash
136+
continue-on-error: true
137+
if: always()
138+
run: |
139+
set -x
140+
export build_preset="${{ inputs.build_preset }}"
141+
python3 -m pip install ydb ydb[yc]
142+
python3 .github/scripts/send_build_stats.py
143+
134144
- name: comment-if-cancel
135145
shell: bash
136146
if: cancelled() && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target')

.github/actions/build_ya/action.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,6 @@ runs:
145145
echo "Build successful." | .github/scripts/tests/comment-pr.py --ok
146146
fi
147147
148-
- name: build_stats
149-
shell: bash
150-
continue-on-error: true
151-
run: |
152-
set -x
153-
export build_preset="${{ inputs.build_preset }}"
154-
python3 -m pip install ydb ydb[yc]
155-
python3 .github/scripts/send_build_stats.py
156-
157148
- name: show free space
158149
if: always()
159150
shell: bash

.github/scripts/send_build_stats.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ def main():
5656
# So, set up it locally
5757
os.environ["YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS"] = os.environ["CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS"]
5858

59+
if not os.path.exists(YDBD_PATH):
60+
# can be possible due to incremental builds and ydbd itself is not affected by changes
61+
print("{} not exists, skipping".format(YDBD_PATH))
62+
return 1
63+
5964
with ydb.Driver(
6065
endpoint="grpcs://ydb.serverless.yandexcloud.net:2135",
6166
database="/ru-central1/b1ggceeul2pkher8vhb6/etn6d1qbals0c29ho4lf",

0 commit comments

Comments
 (0)