-
Notifications
You must be signed in to change notification settings - Fork 25
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
Trevor Sibanda
committed
Oct 28, 2020
1 parent
63e7df8
commit 410129e
Showing
1 changed file
with
129 additions
and
0 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,129 @@ | ||
version: 2.1 | ||
description: FaunaDB Python Driver Tests | ||
|
||
executors: | ||
core: | ||
parameters: | ||
python_version: | ||
type: string | ||
version: | ||
type: enum | ||
enum: ["stable", "nightly"] | ||
resource_class: large | ||
docker: | ||
- image: circleci/python:<<parameters.python_version>> | ||
|
||
- image: gcr.io/faunadb-cloud/faunadb/enterprise/<<parameters.version>>:latest | ||
name: core | ||
auth: | ||
username: _json_key | ||
password: $GCR_KEY | ||
|
||
environment: | ||
FAUNA_ENDPOINT: http:https://core:8443 | ||
FAUNA_ROOT_KEY: secret | ||
FAUNA_DOMAIN: core | ||
FAUNA_SCHEME: http | ||
FAUNA_PORT: 8443 | ||
|
||
commands: | ||
build_and_test: | ||
description: "Run Python tests" | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Install codecov | ||
command: | | ||
sudo pip install codecov | ||
- run: | ||
name: Wait FaunaDB init | ||
command: | | ||
while ! $(curl --output /dev/null --silent --fail --max-time 1 http:https://core:8443/ping); do sleep 1; done | ||
- run: | ||
name: Run Tests | ||
command: | | ||
mkdir results | ||
coverage run setup.py test 2>&1 | tee log.txt | ||
- run: | ||
name: Gather Results | ||
when: always | ||
command: | | ||
mkdir -p results/ | ||
mv log.txt results/log.txt | ||
- store_test_results: | ||
path: results/ | ||
|
||
- store_artifacts: | ||
path: results/ | ||
destination: tr1 | ||
|
||
jobs: | ||
core-stable-38: | ||
executor: | ||
name: core | ||
python_version: "3.8" | ||
version: stable | ||
steps: | ||
- build_and_test | ||
|
||
core-nightly-38: | ||
executor: | ||
name: core | ||
python_version: "3.8" | ||
version: nightly | ||
steps: | ||
- build_and_test | ||
|
||
core-stable-34: | ||
executor: | ||
name: core | ||
python_version: "3.4" | ||
version: stable | ||
steps: | ||
- build_and_test | ||
|
||
core-nightly-34: | ||
executor: | ||
name: core | ||
python_version: "3.4" | ||
version: nightly | ||
steps: | ||
- build_and_test | ||
|
||
core-stable-27: | ||
executor: | ||
name: core | ||
python_version: "2.7" | ||
version: stable | ||
steps: | ||
- build_and_test | ||
|
||
core-nightly-27: | ||
executor: | ||
name: core | ||
python_version: "2.7" | ||
version: nightly | ||
steps: | ||
- build_and_test | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- core-stable-38: | ||
context: faunadb-drivers | ||
- core-nightly-38: | ||
context: faunadb-drivers | ||
- core-stable-34: | ||
context: faunadb-drivers | ||
- core-nightly-34: | ||
context: faunadb-drivers | ||
- core-stable-27: | ||
context: faunadb-drivers | ||
- core-nightly-27: | ||
context: faunadb-drivers |