Skip to content

Commit

Permalink
submmit
Browse files Browse the repository at this point in the history
  • Loading branch information
lx0612 committed Nov 18, 2023
1 parent fa12ee7 commit 6de2f6d
Showing 1 changed file with 41 additions and 19 deletions.
60 changes: 41 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
# 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
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
build:
docker:
- image: cimg/base:stable
# Add steps to the job
# See: https://circleci.com/docs/configuration-reference/#steps
- image: circleci/python:3.7.3-stretch

working_directory: ~/repo

steps:
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
say-hello-workflow:
jobs:
- say-hello
# Set up Docker environment
- setup_remote_docker

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
cd $(eval echo "$CIRCLE_WORKING_DIRECTORY/DevOps_Microservices/project-ml-microservice-kubernetes")
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

# run tests!
- run:
name: run tests
command: |
cd $(eval echo "$CIRCLE_WORKING_DIRECTORY/DevOps_Microservices/project-ml-microservice-kubernetes")
. venv/bin/activate
make test
# run lints!
- run:
name: run lint
command: |
cd $(eval echo "$CIRCLE_WORKING_DIRECTORY/DevOps_Microservices/project-ml-microservice-kubernetes")
. venv/bin/activate
make lint

0 comments on commit 6de2f6d

Please sign in to comment.