Skip to content

Commit 25d6cb4

Browse files
committed
update circleci
1 parent e1b85e5 commit 25d6cb4

File tree

1 file changed

+18
-35
lines changed

1 file changed

+18
-35
lines changed

.circleci/config.yml

+18-35
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,28 @@
1-
# Use the latest 2.1 version of CircleCI pipeline process engine.
2-
# See: https://circleci.com/docs/configuration-reference
3-
4-
# For a detailed guide to building and testing with Python, read the docs:
5-
# https://circleci.com/docs/language-python/ for more details
61
version: 2.1
72

8-
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
9-
# See: https://circleci.com/docs/orb-intro/
10-
orbs:
11-
# See the Python orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
12-
python: circleci/python@2.1.1
13-
14-
# Define a job to be invoked later in a workflow.
15-
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
163
jobs:
17-
build-and-test:
18-
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
19-
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
4+
test_job:
205
docker:
21-
# Specify the version you desire here
22-
# See:https://circleci.com/developer/images/image/cimg/python
23-
- image: cimg/python:3.12
24-
25-
# Add steps to the job
26-
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
6+
- image: cimg/python:3.8 # Use the correct Python version
277
steps:
28-
# Checkout the code as the first step.
29-
- checkout
30-
- python/install-packages:
31-
pkg-manager: pip
32-
# app-dir: ~/project/package-directory/ # If your requirements.txt isn't in the root directory.
33-
# pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements.
8+
- checkout # Pull down the source code
9+
- run:
10+
name: Install dependencies
11+
command: |
12+
python -m venv venv
13+
. venv/bin/activate
14+
pip install -r requirements.txt
15+
pip install -r requirements-dev.txt
16+
pip install pytest # Ensure pytest is installed
3417
- run:
3518
name: Run tests
36-
# This assumes pytest is installed via the install-package step above
37-
command: pytest
19+
command: |
20+
. venv/bin/activate
21+
pytest # Run pytest to execute the tests
22+
- store_test_results:
23+
path: test-results
3824

39-
# Orchestrate jobs using workflows
40-
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
4125
workflows:
42-
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
43-
# Inside the workflow, you define the jobs you want to run.
26+
test_workflow:
4427
jobs:
45-
- build-and-test
28+
- test_job

0 commit comments

Comments
 (0)