diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..edf6a031 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2.1 +orbs: + codecov: codecov/codecov@3.0.0 + +jobs: + build: + docker: + - image: cimg/python:3.9.6 + steps: + - checkout + - run: + name: Install dependencies + command: pip install -r requirements.txt + - run: + name: Run tests and collect coverage + command: | + coverage run tests.py + coverage xml + - codecov/upload + +workflow: + version: 2.1 + build-test: + jobs: + - build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..433eac75 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: Workflow for Codecov example-python +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run tests and collect coverage + run: | + coverage run tests.py + coverage xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5342d85..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Disable sudo to speed up the build -sudo: false - -# Set the build language to Python -language: python - -# Set the python version to 2.7 -python: 2.7 - -# Install the codecov pip dependency -install: - - pip install codecov - -# Run the unit test -script: - - coverage run tests.py - -# Push the results back to codecov -after_success: - - codecov diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index c9ea4d44..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Azure Pipelines configuration - -trigger: -- master - -pool: - vmImage: 'ubuntu-latest' -strategy: - matrix: - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip - pip install coverage - displayName: 'Install coverage' - -- script: | - coverage run tests.py - displayName: 'Run tests' - -- script: | - bash <(curl -s https://codecov.io/bash) - displayName: 'Upload to codecov.io' diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4ebc8aea --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +coverage