diff --git a/.circleci/config.yml b/.circleci/config.yml index 6554e1f..942eef5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,40 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - say-hello: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor +orbs: + coverage-reporter: codacy/coverage-reporter@11.10.0 + python: circleci/python@2.0.3 + +executors: + python310-docker: docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps + - image: cimg/python:3.10 + resource_class: medium + +commands: + setup_test_sentiment_analysis: steps: - checkout - run: - name: "Say hello" - command: "echo Hello, World!" + name: "Install package" + command: | + pip install -e . + - run: + name: "Test sentiment analysis" + command: | + python tests/test_sentiment.py + # - coverage-reporter/send_report: + # coverage-reports: 'coverage.xml' + # project-token: $CODACY_PROJECT_TOKEN + +jobs: + test_sentiment: # this can be any name you choose + executor: python310-docker # use the default executor defined within the orb + steps: + - setup_test_sentiment_analysis -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: - say-hello-workflow: + # Name the workflow "welcome" + main: + # Run the welcome/run job in its own container jobs: - - say-hello + - test_urbans