Skip to content

Commit d6c78ef

Browse files
authored
An/fix 1 (#315)
<!-- Solution for PR template choice: https://stackoverflow.com/a/75030350/24543008 --> Please go to the `Preview` tab and select the appropriate template: * [Submit Student task (English)](?expand=1&template=task_submission_en.md) * [Submit Student task (Russian)](?expand=1&template=task_submission_ru.md)
1 parent 373b71f commit d6c78ef

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
git config --global --add safe.directory '*'
2727
- name: Run pre-commit checks
2828
run: |
29-
FROM_REF="${{ github.base_ref || 'HEAD~1' }}"
30-
git fetch origin $FROM_REF:$FROM_REF || true
31-
pre-commit run --from-ref $FROM_REF --to-ref HEAD
29+
FROM_REF="${{ github.base_ref }}"
30+
if [ -n "$FROM_REF" ]; then
31+
git fetch origin "$FROM_REF:$FROM_REF" || true
32+
else
33+
FROM_REF="HEAD~1"
34+
fi
35+
pre-commit run --from-ref "$FROM_REF" --to-ref HEAD

tasks/kutergin_v_reduce/tests/functional/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ TEST_P(ReduceTests, ReduceTest) {
121121
ExecuteTest(GetParam());
122122
}
123123

124-
const std::array<TestType, 4> kTestCases = {
125-
std::make_tuple(10, 0, "sz_10_r_0"), std::make_tuple(20, 1, "sz_20_r_1"),
126-
std::make_tuple(1, 3, "sz_1_r_3"), std::make_tuple(100, 2, "sz_100_r_2")};
124+
const std::array<TestType, 4> kTestCases = {std::make_tuple(10, 0, "sz_10_r_0"), std::make_tuple(20, 1, "sz_20_r_1"),
125+
std::make_tuple(1, 3, "sz_1_r_3"), std::make_tuple(100, 2, "sz_100_r_2")};
127126

128127
const auto kTestTasksList =
129128
std::tuple_cat(ppc::util::AddFuncTask<ReduceSequential, InType>(kTestCases, PPC_SETTINGS_kutergin_v_reduce),

tasks/nikitina_v_max_elem_matr/tests/functional/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ const auto kTestTasksList = std::tuple_cat(
116116

117117
const auto kGtestValues = ppc::util::ExpandToValues(kTestTasksList);
118118

119-
INSTANTIATE_TEST_SUITE_P(NikitinaMaxElem, NikitinaMaxElemTests, kGtestValues,
120-
NikitinaMaxElemTests::PrintTestParam);
119+
INSTANTIATE_TEST_SUITE_P(NikitinaMaxElem, NikitinaMaxElemTests, kGtestValues, NikitinaMaxElemTests::PrintTestParam);
121120

122121
} // namespace
123122

0 commit comments

Comments
 (0)