-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: nayduck in ci on merge (#12132)
Adding nayduck to ci on merge. Adding only one group of tests for now. Extracting small portion of tests taking >12m to complete to very_expensive.txt, fixing them should be a rare event anyway. --------- Co-authored-by: Andrei <[email protected]>
- Loading branch information
1 parent
6b76ee6
commit fe92b5a
Showing
8 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI Nayduck tests | ||
on: | ||
merge_group: | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
nayduck_tests: | ||
runs-on: "ubuntu-latest" | ||
environment: development | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Install JQ json processor | ||
run: sudo apt install jq | ||
|
||
- name: Install required python modules | ||
run: | | ||
pip3 install -r pytest/requirements.txt | ||
- name: Create nayduck-code file | ||
run: | | ||
echo ${{ secrets.NAYDUCK_CODE }} > ~/.config/nayduck-code | ||
- name: Run Nayduck tests and wait for results | ||
run: | | ||
NEW_TEST=$(python3 scripts/nayduck.py --test-file nightly/ci.txt) | ||
RUN_ID=$(echo $NEW_TEST | grep https | sed -E 's|.*\/run\/([0-9]+)|\1|g') | ||
# wait all the tests to finish | ||
while true; do | ||
TEST_RESULTS=$(curl -s https://nayduck.nearone.org/api/run/$RUN_ID) | ||
TESTS_NOT_READY=$( jq -e '.tests | .[] | select(.status == "RUNNING" or .status == "PENDING" ) ' <<< ${TEST_RESULTS} ) | ||
if [ -z "$TESTS_NOT_READY" ]; then break; fi | ||
sleep 15 | ||
done | ||
UNSUCCESSFUL_TESTS=$(jq -e '.tests | .[] | select(.status != "PASSED" and .status != "IGNORED") ' <<< ${TEST_RESULTS} ) | ||
if [ -z "$UNSUCCESSFUL_TESTS" ]; then | ||
echo "Nayduck CI tests passed." | ||
echo "Results available at https://nayduck.nearone.org/#/run/$RUN_ID" | ||
else | ||
echo "CI Nayduck tests are failing https://nayduck.nearone.org/#/run/$RUN_ID." | ||
echo "Fix them before merging" | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TODO: add remaining tests. | ||
./pytest.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
./sandbox.txt | ||
./pytest.txt | ||
./expensive.txt | ||
./very_expensive.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Catchup tests | ||
expensive --timeout=3600 near-client near_client tests::catching_up::test_all_chunks_accepted_1000 | ||
expensive --timeout=3600 near-client near_client tests::catching_up::test_all_chunks_accepted_1000 --features nightly | ||
expensive --timeout=7200 near-client near_client tests::catching_up::test_all_chunks_accepted_1000_slow | ||
expensive --timeout=7200 near-client near_client tests::catching_up::test_all_chunks_accepted_1000_slow --features nightly | ||
expensive --timeout=1800 near-client near_client tests::catching_up::test_all_chunks_accepted_1000_rare_epoch_changing | ||
expensive --timeout=1800 near-client near_client tests::catching_up::test_all_chunks_accepted_1000_rare_epoch_changing --features nightly | ||
|
||
# Make sure Docker image can be build and run | ||
pytest --skip-build --timeout=1h sanity/docker.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters