From 7c7d25aea5718bad4aa20ef129e3230deb0bf5c0 Mon Sep 17 00:00:00 2001 From: chuongnh140 <75369541+chuongnh140@users.noreply.github.com> Date: Wed, 6 Jan 2021 08:20:07 +0700 Subject: [PATCH] Add .circleci/config.yml --- .circleci/config.yml | 87 +++++--------------------------------------- 1 file changed, 9 insertions(+), 78 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8d1072a..6f98693a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,82 +1,13 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 - -######### -# Common -######### +# Use a package of configuration called an orb. orbs: - heroku: circleci/heroku@1.0.1 - -############ -# Workflows -############ + # Declare a dependency on the welcome-orb + welcome: circleci/welcome-orb@0.4.1 +# Orchestrate or schedule a set of jobs workflows: - version: 2 - build-deploy: + # Name the workflow "welcome" + welcome: + # Run the welcome/run job in its own container jobs: - - build - - deploy: - requires: - - build - filters: - branches: - only: master - -################## -# Job Definitions -################## -jobs: - build: - docker: - - image: circleci/python:3.6.2-stretch-browsers - environment: - FLASK_CONFIG: testing - TEST_DATABASE_URL: postgresql://ubuntu@localhost/circle_test?sslmode=disable - - image: circleci/postgres:9.6.5-alpine-ram - environment: - POSTGRES_USER: ubuntu - POSTGRES_DB: circle_test - POSTGRES_PASSWORD: '' - steps: - - checkout - - run: mkdir test-reports - - run: - name: Download Selenium - command: | - curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar - - run: - name: Start Selenium - command: | - java -jar selenium-server-standalone-3.5.3.jar -log test-reports/selenium.log - background: true - - restore_cache: - key: deps2-{{ checksum "requirements/dev.txt" }} - - run: - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements/dev.txt - - save_cache: - key: deps2-{{ checksum "requirements/dev.txt" }} - paths: - - 'venv' - - run: - command: | - . venv/bin/activate - python manage.py test - - store_artifacts: - path: test-reports/ - destination: tr1 - - store_test_results: - path: test-reports/ - - deploy: - executor: heroku/default - steps: - - checkout - - add_ssh_keys: - fingerprints: - - '48:a0:87:54:ca:75:32:12:c6:9e:a2:77:a4:7a:08:a4' - - heroku/install - - heroku/deploy-via-git: - force: true - + - welcome/run