From d3f451f92d0d48081bfe03a47f0c0cb5324e99a3 Mon Sep 17 00:00:00 2001 From: tristanlatr Date: Tue, 24 Nov 2020 16:56:36 -0500 Subject: [PATCH] Add a tox env and github action to automate the testing #7 --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++ src/tox.ini | 15 ++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 src/tox.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fb0b909 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test epydoc + +on: + push: + branches: "*" + +jobs: + doc: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install tox + run: | + python -m pip install --upgrade pip tox + + - name: Install epydoc + run: | + cd src + python setup.py install + cd .. + + - name: Log system information + run: | + test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"' + python --version + python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')" + python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]" + + - name: Test with python2.7 and python3.8 + run: | + cd src + tox + cd .. + \ No newline at end of file diff --git a/src/tox.ini b/src/tox.ini new file mode 100644 index 0000000..c318337 --- /dev/null +++ b/src/tox.ini @@ -0,0 +1,15 @@ +[tox] +minversion=3.20.1 +requires= + virtualenv>=20.0.35 +envlist = + test-{py27,py38} + +[testenv] +deps = + test: docutils + +commands = + test-py27: python epydoc/test/__init__.py + test-py38: python3 epydoc/test/__init__.py +