-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[circleci] add cicd config for public
- Loading branch information
Showing
1 changed file
with
54 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,54 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs | ||
jobs: | ||
test: | ||
docker: | ||
- image: cimg/python:3.8 | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup config files and folders | ||
command: | | ||
# Insall aws cli | ||
pip install awscli --upgrade | ||
# Copy settings file | ||
aws s3 cp $PATH edenai_apis/api_keys --recursive | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install ffmpeg -y | ||
pip install -r requirements.txt | ||
- run: | ||
name: Test | ||
command: | | ||
cd edenai_apis | ||
mkdir test-results | ||
export TEST_SCOPE="CICD" && pytest -vvv -n auto --maxprocesses=8 --dist loadgroup --junitxml=test-results/junit.xml --cov | ||
- store_test_results: | ||
path: edenai_apis/test-results/junit.xml | ||
- store_artifacts: | ||
path: edenai_apis/htmlcov | ||
|
||
# Invoke jobs via workflows | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
workflows: | ||
test-workflow: | ||
jobs: | ||
- test: | ||
context: | ||
- Edenai-back | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- circleci |