Start testing in Github Actions

pull/279/head
Ashley Whetter 3 years ago
parent 826bb2badd
commit 66f3734afa

@ -0,0 +1,34 @@
name: tests
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox
- name: Run tests
run: tox -e py
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox
- name: Lint
run: tox -e formatting,lint

@ -1,26 +0,0 @@
os: linux
dist: xenial
language: python
install:
- pip install tox-travis
script:
- tox
python:
- 3.6
- 3.7
- 3.8
- 3.9
jobs:
include:
- python: 3.9
env: TOXENV=docs
- python: 3.9
env: TOXENV=lint
- python: 3.9
env: TOXENV=formatting
notifications:
slack:
rooms:
- readthedocs:y3hjODOi7EIz1JAbD1Zb41sz#random
on_success: change
on_failure: always

@ -10,7 +10,6 @@ Features
^^^^^^^^
* Expandable value for multi-line string attributes.
* Added support for Sphinx 3.5.
* `#265 <https://github.com/readthedocs/sphinx-autoapi/issues/265>`
Can resolve the qualified paths of parameters to generics.

@ -5,13 +5,9 @@ Sphinx AutoAPI
:target: https://sphinx-autoapi.readthedocs.org
:alt: Documentation
.. image:: https://travis-ci.org/readthedocs/sphinx-autoapi.svg?branch=master
:target: https://travis-ci.org/readthedocs/sphinx-autoapi
:alt: Travis Build Status
.. image:: https://ci.appveyor.com/api/projects/status/5nd33gp2eq7411t1?svg=true
:target: https://ci.appveyor.com/project/ericholscher/sphinx-autoapi
:alt: Appveyor Build Status
.. image:: https://github.com/readthedocs/sphinx-autoapi/actions/workflows/main.yml/badge.svg?branch=master
:target: https://github.com/readthedocs/sphinx-autoapi/actions/workflows/main.yml?query=branch%3Amaster
:alt: Github Build Status
.. image:: https://img.shields.io/pypi/v/sphinx-autoapi.svg
:target: https://pypi.org/project/sphinx-autoapi/

@ -1,13 +0,0 @@
build: false
environment:
matrix:
- PYTHON: "C:/Python37"
install:
- ps: "[Net.ServicePointManager]::SecurityProtocol = 'Ssl3, Tls, Tls11, Tls12'"
- ps: "Start-FileDownload 'https://bootstrap.pypa.io/get-pip.py' -FileName 'C:/get-pip.py'"
- "%PYTHON%/python.exe C:/get-pip.py"
- "%PYTHON%/Scripts/pip.exe --version"
- "%PYTHON%/Scripts/pip.exe install tox"
test_script:
- "git clone https://github.com/aspnet/Identity %APPVEYOR_BUILD_FOLDER%/tests/dotnetexample/example/Identity"
- "%PYTHON%/Scripts/tox.exe -e py37"

@ -405,12 +405,13 @@ def _resolve_annotation(annotation):
resolved = resolve_qualname(annotation, annotation.as_string())
elif isinstance(annotation, astroid.Subscript):
value = _resolve_annotation(annotation.value)
if isinstance(annotation.slice, astroid.Tuple):
slice_ = ", ".join(
_resolve_annotation(elt) for elt in annotation.slice.elts
)
slice_node = annotation.slice
if isinstance(slice_node, astroid.Index):
slice_node = slice_node.value
if isinstance(slice_node, astroid.Tuple):
slice_ = ", ".join(_resolve_annotation(elt) for elt in slice_node.elts)
else:
slice_ = _resolve_annotation(annotation.slice)
slice_ = _resolve_annotation(slice_node)
resolved = f"{value}[{slice_}]"
elif isinstance(annotation, astroid.Tuple):
resolved = (

@ -1,24 +0,0 @@
strictness: low
test-warnings: false
doc-warnings: true
ignore-paths:
- docs
- tests
pep8:
run: false
pylint:
max-line-length: 100
disable:
- interface-not-implemented
# We still support Python 2 so we have to inherit from object
- useless-object-inheritance
mccabe:
run: false
pep257:
run: false

@ -0,0 +1,2 @@
from setuptools import setup
setup()

@ -1,32 +1,18 @@
[tox]
isolated_build = true
envlist =
py{36,37,38,39}-sphinx{30,31,32,33,34,35}
# Keep this in sync with .github/workflows/main.yml
py{36,37,38,39}
formatting
lint
docs
[travis]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
[testenv]
setenv =
LANG=C
extras =
dotnet
go
deps =
pytest
sphinx30: Sphinx<3.1
sphinx31: Sphinx<3.2
sphinx32: Sphinx<3.3
sphinx33: Sphinx<3.4
sphinx34: Sphinx<3.5
sphinx35: Sphinx<3.6
commands =
pytest {posargs}

Loading…
Cancel
Save