Add .circleci/config.yml

This commit is contained in:
Ha Thach 2024-05-10 13:00:19 +07:00
parent 15e2ccf1b3
commit 8d63d9368e

View File

@ -1,39 +1,31 @@
# This config was automatically generated from your source code
# Stacks detected: cicd:github-actions:.github/workflows,deps:python:docs
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1
orbs:
python: circleci/python@2
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
jobs:
test-python:
# Install dependencies and run tests
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/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
docker:
- image: cimg/python:3.8-node
working_directory: ~/project/docs
# Specify the version you desire here
# See: https://circleci.com/developer/images/image/cimg/base
- image: cimg/base:current
# Add steps to the job
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
steps:
- checkout:
path: ~/project
- python/install-packages
# Checkout the code as the first step.
- checkout
- run:
name: Run tests
command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.')
- store_test_results:
path: junit.xml
deploy:
# This is an example deploy job, not actually used by the workflow
docker:
- image: cimg/base:stable
steps:
# Replace this with steps to deploy to users
- run:
name: deploy
command: '#e.g. ./deploy.sh'
- run:
name: found github actions config
command: ':'
name: "Say hello"
command: "echo Hello, World!"
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
workflows:
build-and-test:
say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- test-python
# - deploy:
# requires:
# - test-python
- say-hello