diff --git a/.circleci/config.yml b/.circleci/config.yml index 48a0973..5ca0906 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,114 +1,18 @@ version: 2.1 -# Define executors -executors: - node-executor: - docker: - - image: cimg/node:18.17 - working_directory: ~/project -# Define jobs -jobs: - # Job that always runs - test: - executor: node-executor - steps: - - checkout - - run: - name: Run tests - command: echo "run test" - - run: - name: Run linting - command: echo "run linting" - # Job that always runs - build: - executor: node-executor +jobs: + test-coordinator: + type: no-op + test-unit: + docker: + - image: cimg/node:20.10 steps: - checkout - - run: - name: Run tests - command: echo "run test" - - run: - name: Run linting - command: echo "run linting" - # Conditional job - only runs on main branch - deploy: - executor: node-executor - steps: - - - run: - name: Deploy to production - command: | - echo "Deploying to production..." - # Add your deployment commands here - # e.g., aws s3 sync dist/ s3://my-bucket/ - # e.g., kubectl apply -f k8s/ - echo "Deployment completed!" - - # Another conditional job - only runs on feature branches - integration-test: - executor: node-executor - steps: - - run: - name: Run integration tests - command: | - echo "Running integration tests..." - # Add integration test commands here - - -# Define workflows workflows: - version: 2 build-test-deploy: jobs: - # These jobs run on every commit - - test - - build: - requires: - - test - - # Conditional job: Deploy only runs on main branch - - deploy: - requires: - - build - filters: - branches: - only: main - - # Conditional job: Integration tests only run on feature branches - - integration-test: - requires: - - build - filters: - branches: - ignore: - - main - - develop - - # Alternative workflow that runs only on tags - release: - jobs: - - test: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - - build: - requires: - - test - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - - deploy: - requires: - - build - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - + - test-coordinator + - test-unit +#test