Skip to content

Commit

Permalink
Setting up config
Browse files Browse the repository at this point in the history
  • Loading branch information
apetenchea committed Oct 13, 2023
1 parent 9077e57 commit cc0bfdd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ jobs:
docker:
- image: python:<< parameters.python-version >>
name: driver
command:
- "python -m http.server"
- image: arangodb/<< parameters.arangodb-version >>
name: db
environment:
ARANGODB_CONF: << parameters.arangodb-config >>
command:
- "/bin/sh"
- "-c"
- >
export ARANGODB_CONF=<< parameters.arangodb-config >> &&
wget -O - https://raw.githubusercontent.com/ArangoDB-Community/python-arango/main/tests/static/setup.sh |
wget --quiet --waitretry=1 --tries=60 -O - http://driver:8000/tests/static/setup.sh |
/bin/sh
steps:
- checkout
- run:
name: "Wait for ArangoDB starter"
command: |
url="http://db:8528/version"
for _ in {1..30}; do
if curl --output /dev/null --silent "$url"; then
echo "starter ready!"
exit 0
fi
echo "url not available, retrying..."
sleep 1
done
echo "starter not ready, giving up"
exit 1
- run:
name: "Install Dependencies"
command: |
pip install -e .[dev]
- run:
name: "Wait for ArangoDB starter"
command: |
wget --quite --waitretry=1 --tries=120 -O - http://db:8528/version
if [ $? -eq 0 ]; then
echo "starter ready"
exit 0
else
echo "starter not ready, giving up"
exit 1
fi
- run:
name: "Run Tests"
command: |
Expand Down
7 changes: 7 additions & 0 deletions tests/static/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

mkdir -p /tests/static
wget -O /tests/static/service.zip "https://raw.githubusercontent.com/ArangoDB-Community/python-arango/main/tests/static/service.zip"
wget -O /tests/static/keyfile "https://raw.githubusercontent.com/ArangoDB-Community/python-arango/main/tests/static/keyfile"
wget -O /tests/static/arangodb.conf "https://raw.githubusercontent.com/ArangoDB-Community/python-arango/main/tests/static/$ARANGODB_CONF"
arangodb --configuration=/tests/static/arangodb.conf

0 comments on commit cc0bfdd

Please sign in to comment.