Skip to content

Commit

Permalink
CI: remove Android from runner, set timeout=60
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjakob committed Feb 13, 2024
1 parent e843d11 commit 28b83a9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
ports:
- 9200:9200
steps:
- name: Maximize disk space
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-android: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
Expand Down
2 changes: 1 addition & 1 deletion bin/mocks/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def patched_es_init(self, *args, **kwargs):
assert kwargs["cloud_id"] == "foo"
if "api_key" in kwargs:
assert kwargs["api_key"] == "bar"
return orig_es_init(self, "http://localhost:9200")
return orig_es_init(self, "http://localhost:9200", timeout=60)

# patch Elasticsearch.__init__
elasticsearch.Elasticsearch.__init__ = patched_es_init
Expand Down
17 changes: 16 additions & 1 deletion bin/nbtest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if [[ ! -f $SCRIPT_DIR/../.venv/bin/nbtest ]]; then
make nbtest
make install-nbtest
fi

if [[ "$PATCH_ES" != "" ]]; then
Expand All @@ -17,5 +17,20 @@ if [[ "$PATCH_ES" != "" ]]; then
$SCRIPT_DIR/../.venv/bin/pip install -qqq elasticsearch
fi

df -h

source $SCRIPT_DIR/../.venv/bin/activate
$SCRIPT_DIR/../.venv/bin/nbtest $*

curl 'localhost:9200/_search?q=*'
echo
echo
curl 'localhost:9200/_ml/trained_models/_stats'
echo
echo
df -h
curl -XPOST 'localhost:9200/_flush'
sleep 10
echo
df -h
du -h / | sort -h

0 comments on commit 28b83a9

Please sign in to comment.