diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0d552b6 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,83 @@ +--- +name: CI +on: + - push + - pull_request +jobs: + lint: + name: Run linters + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: python -m pip install tox + - name: Run tox + run: tox -e style + test: + name: Run unit tests + runs-on: ubuntu-latest + strategy: + matrix: + python: [3.6, 3.7, 3.8, 3.9] + steps: + - name: Checkout source code + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: python -m pip install tox + - name: Run unit tests (via tox) + # Run tox using the version of Python in `PATH` + run: tox -e py + docs: + name: Build docs + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: python -m pip install tox + - name: Build docs (via tox) + run: tox -e docs + - name: Archive build results + uses: actions/upload-artifact@v2 + with: + name: html-docs-build + path: docs/_build/html + retention-days: 7 + release: + name: Upload release artifacts + runs-on: ubuntu-latest + needs: test + if: github.event_name == 'push' + steps: + - name: Checkout source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: python -m pip install build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 584cfce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -language: python -cache: pip -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 -install: - - pip install tox-travis - - pip install codecov -script: - - tox -after_success: - - codecov -stages: - - test - - deploy -jobs: - include: - - stage: deploy - python: 3.6 - install: skip # no tests, no depedencies needed - script: skip # we're not running tests - deploy: - provider: pypi - user: stephenfin - password: - secure: "VhbttK0qaGjz7ISIUEAVxPEn8Qo5vu0kRT97C9WykI7BkrkceuSj7c+neCFlXpsUm3VnyzmUgYzDMHBI/EbmzrsX48lTC0GKhDpEBV/gxVmWE+2tdSqYXC1yyBbMFhEm7ygCle8RQomAptWO2C7lcoYazvwT8kWngi15/KKzgUizC5lqiv2VyW8kzPg9qTSGft0IUAA8vVYjlCIlgYVcpk3tHSzOvedsrGd6XZEPQlGtDdeUiDHQ2usxpdOKWJ+Mq6nxpwqwOHvPUB2WvWoYFKfZZrESf9EpnuUrc5JFTbUN9k1RUnsW9DAcg/qNA37vFK1hyGT5RDNCQr90g+j7cUtYicOLA6nnzHE3ccH9oFVCx5gNs1IWEES7hpfMDIqHR5EQy6ez5mzjb8EDHZn+mxjHeSL45kECGiDwrrbqXsfFXIZtc+stX8RHRJupx6wSO+hjbkQvIDdWWeAw8nEhWqHq4LPNM/5S3ZUUx0/YyYME0tJ5nr6U1zNzVjQ3cumjq8bmQbZKd80/X/a9dc9hjFfD3gIyKL7mvwnb5/igBTdk+ymhyUMxAhX0Sx94eZpVd4nXCVSTLCwVMel+z2wRU/hWQurNUhtSv7lZ4Y1/88HsbQ+aB98j8EtwV59IsCSsUUQdTtiYOcwUKZqrVRm+cWD2heT5eBMyB1d+BYjLEWY=" - on: - tags: true - distributions: sdist bdist_wheel diff --git a/README.rst b/README.rst index 60ff3a6..7d1fd7e 100644 --- a/README.rst +++ b/README.rst @@ -2,9 +2,9 @@ sphinx-click ============ -.. image:: https://travis-ci.org/click-contrib/sphinx-click.svg?branch=master - :target: https://travis-ci.org/click-contrib/sphinx-click - :alt: CI Status +.. image:: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml/badge.svg + :target: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml + :alt: Build Status .. image:: https://readthedocs.org/projects/sphinx-click/badge/?version=latest :target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest