albertyw/req-update

View on GitHub
.drone.yml

Summary

Maintainability
Test Coverage
kind: pipeline
type: docker
name: test

steps:
  - name: Test Python 3.7
    image: python:3.12
    commands:
      - pip install build
      - python -m build
      - python -m unittest

  - name: Test Python 3.12
    image: python:3.12
    commands:
      - curl -L "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-$(dpkg --print-architecture)" > "${HOME}/bin/cc-test-reporter"
      - chmod +x "${HOME}/bin/cc-test-reporter"
      - pip install -e .[test]
      - ruff check .
      - mypy .
      - cc-test-reporter before-build
      - coverage run -m unittest
      - exitcode="$?"
      - coverage xml
      - cc-test-reporter after-build --exit-code "$exitcode"
      - coverage report -m
    environment:
      CC_TEST_REPORTER_ID: 20588a9f3d871445aaee95c9e3f5799cb13812b98b321a34ecebf503578fa2c8

  - name: Test Python Packaging
    depends_on:
      - Test Python 3.7
      - Test Python 3.12
    image: python:3.12
    commands:
      - pip install build twine
      - python -m build
      - twine check --strict dist/*

  - name: Upload Python
    depends_on:
      - Test Python Packaging
    environment:
      TWINE_USERNAME:
        from_secret: twine_username
      TWINE_PASSWORD:
        from_secret: twine_password
    image: python:3.12
    commands:
      - pip install build twine
      - python -m build
      - twine upload dist/*
    when:
      event:
        - tag