-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23b96bb
commit 505e085
Showing
21 changed files
with
435 additions
and
193 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 |
---|---|---|
@@ -1,26 +1,164 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/configuration-reference | ||
version: 2.1 | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/configuration-reference/#jobs | ||
parameters: | ||
preview: | ||
type: boolean | ||
default: true | ||
3-10: | ||
type: boolean | ||
default: true | ||
3-11: | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
say-hello: | ||
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/configuration-reference/#executor-job | ||
run-tests: | ||
resource_class: small | ||
parameters: | ||
python-version: | ||
type: string | ||
default: "latest" | ||
arangodb-version: | ||
type: string | ||
default: "arangodb:latest" | ||
arangodb-config: | ||
type: string | ||
default: "single.conf" | ||
cluster: | ||
type: boolean | ||
default: false | ||
enterprise: | ||
type: boolean | ||
default: false | ||
docker: | ||
- image: cimg/base:stable | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/configuration-reference/#steps | ||
- image: python:<< parameters.python-version >> | ||
command: ["/bin/sh", "-c", "python -m http.server"] | ||
- image: arangodb/<< parameters.arangodb-version >> | ||
environment: | ||
ARANGODB_CONF: << parameters.arangodb-config >> | ||
PROJECT: /root/project | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- > | ||
while ! wget -q -O /dev/null http://localhost:8000/$PROJECT/tests/static/setup.sh; do sleep 1; done && | ||
wget -O - http://localhost:8000/$PROJECT/tests/static/setup.sh | | ||
/bin/sh | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Say hello" | ||
command: "echo Hello, World!" | ||
name: "Install Dependencies" | ||
command: | | ||
pip install -e .[dev] | ||
- run: | ||
name: "Wait for ArangoDB starter" | ||
command: | | ||
wget --quiet --waitretry=1 --tries=120 -O - http://localhost:8528/version | ||
if [ $? -eq 0 ]; then | ||
echo "starter ready" | ||
exit 0 | ||
else | ||
echo "starter not ready, giving up" | ||
exit 1 | ||
fi | ||
- run: | ||
name: "Run pytest" | ||
command: | | ||
mkdir test-results | ||
args=("--log-cli-level=DEBUG" "--host" "localhost" "--junitxml=./test-results/junit.xml") | ||
if [ << parameters.cluster >> = true ]; then | ||
args+=("--cluster" "--port=8529" "--port=8539" "--port=8549") | ||
else | ||
args+=("--port=8529") | ||
fi | ||
if [ << parameters.enterprise >> = true ]; then | ||
args+=("--enterprise") | ||
fi | ||
echo "Running py.test with args: ${args[@]}" | ||
py.test "${args[@]}" | ||
- store_test_results: | ||
path: ./test-results/junit.xml | ||
- store_artifacts: | ||
path: ./test-results | ||
|
||
# Orchestrate jobs using workflows | ||
# See: https://circleci.com/docs/configuration-reference/#workflows | ||
workflows: | ||
say-hello-workflow: | ||
python-3.8-community-single-3.10: | ||
when: << pipeline.parameters.3-10 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.8-community-single-3.10 | ||
python-version: "3.8.2" | ||
arangodb-version: "arangodb:3.10.10" | ||
arangodb-config: "single-3.10.conf" | ||
cluster: false | ||
enterprise: false | ||
python-3.8-enterprise-cluster-3.10: | ||
when: << pipeline.parameters.3-10 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.8-enterprise-cluster-3.10 | ||
python-version: "3.8.2" | ||
arangodb-version: "enterprise:3.10.10" | ||
arangodb-config: "cluster-3.10.conf" | ||
cluster: true | ||
enterprise: true | ||
python-3.10-community-single-3.11: | ||
when: << pipeline.parameters.3-11 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.10-community-single-3.11 | ||
python-version: "3.10.6" | ||
arangodb-version: "arangodb:3.11.4" | ||
arangodb-config: "single.conf" | ||
cluster: false | ||
enterprise: false | ||
python-3.10-community-cluster-3.11: | ||
when: << pipeline.parameters.3-11 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.10-community-cluster-3.11 | ||
python-version: "3.10.6" | ||
arangodb-version: "arangodb:3.11.4" | ||
arangodb-config: "cluster.conf" | ||
cluster: true | ||
enterprise: false | ||
python-3.10-enterprise-single-3.11: | ||
when: << pipeline.parameters.3-11 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.10-enterprise-single-3.11 | ||
python-version: "3.10.6" | ||
arangodb-version: "enterprise:3.11.4" | ||
arangodb-config: "single.conf" | ||
cluster: false | ||
enterprise: true | ||
python-3.10-enterprise-cluster-3.11: | ||
when: << pipeline.parameters.3-11 >> | ||
jobs: | ||
- run-tests: | ||
name: python-3.10-enterprise-cluster-3.11 | ||
python-version: "3.10.6" | ||
arangodb-version: "enterprise:3.11.4" | ||
arangodb-config: "cluster.conf" | ||
cluster: true | ||
enterprise: true | ||
python-latest-enterprise-single-preview: | ||
when: << pipeline.parameters.preview >> | ||
jobs: | ||
- run-tests: | ||
name: python-latest-enterprise-single-preview | ||
python-version: "latest" | ||
arangodb-version: "enterprise-preview:latest" | ||
arangodb-config: "single.conf" | ||
cluster: false | ||
enterprise: true | ||
python-latest-enterprise-cluster-preview: | ||
when: << pipeline.parameters.preview >> | ||
jobs: | ||
- say-hello | ||
- run-tests: | ||
name: python-latest-enterprise-cluster-preview | ||
python-version: "latest" | ||
arangodb-version: "enterprise-preview:latest" | ||
arangodb-config: "cluster.conf" | ||
cluster: true | ||
enterprise: true |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: CodeQL | |
|
||
on: | ||
pull_request: | ||
branches: [main, dev] | ||
branches: [main] | ||
schedule: | ||
- cron: '21 2 * * 3' | ||
|
||
|
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
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
Oops, something went wrong.