diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..36634d5f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,77 @@ +name: CI + +on: + push: + +jobs: + superlegacy: + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + python-version: [2.6, 3.3, 3.4] + include: + - python-version: 2.6 + image: cronosmobi/python2.6 + - python-version: 3.3 + image: python:3.3 + - python-version: 3.4 + image: python:3.4 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run tests in Python ${{ matrix.python-version }} + uses: addnab/docker-run-action@v3 + with: + image: ${{ matrix.image }} + options: -v ${{ github.workspace }}:/workspace + run: | + cd /workspace + python --version + wget \ + https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz \ + https://files.pythonhosted.org/packages/d2/2d/e15d38b0a34a3e88e3c164a7ec04ed43f45869c20304db13875b24002506/coverage-3.6.tar.gz \ + https://files.pythonhosted.org/packages/de/f4/b205776cf5cbddbc1e2c3223fa29c0d05f18a9b8afad8cfa23438c217434/nose-1.3.0.tar.gz \ + https://files.pythonhosted.org/packages/70/a9/9b66f22d038de51e05f92d5e677fd89d8f9c980db0b8a130621baad052f5/flake8-2.6.2-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/69/be/9c322ed286263a93e5ee0ff575662d0709fc73ee906522e7cfa72b08b946/mccabe-0.5.3-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/05/00/2867f51e4c2526fd8524176520aecfcd1562033cc5f7110673012294fcc7/pyflakes-1.1.0-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/73/31/136a79364c1681a3c276796d1f5090833bd03461b78a1b037638d1a2c484/pycodestyle-2.0.0-py2.py3-none-any.whl + test "${{ matrix.python-version}}" = "2.6" && \ + wget https://files.pythonhosted.org/packages/31/77/3781f65cafe55480b56914def99022a5d2965a4bb269655c89ef2f1de3cd/importlib-1.0.4.zip && \ + pip install --no-index importlib-1.0.4.zip + pip install --no-index *.whl *.tar.gz + pip install --no-index -e . + nosetests --with-doctest + + legacy: + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + python: [2.7, 3.6, 3.7, 3.8] + include: + - python: 2.7 + image: python:2.7-slim + - python: 3.6 + image: python:3.6-slim + - python: 3.7 + image: python:3.7-slim + - python: 3.8 + image: python:3.8-slim + + container: + image: ${{ matrix.image }} + + steps: + - uses: actions/checkout@v4 + - name: Check python version + run: python --version + - name: Install dependencies + run: pip install --requirement requirements/testing.txt + - name: Install PyDocX + run: pip install -e .[dev] # editable install so CLI entry points are available + - name: Run tests + run: nosetests --with-doctest diff --git a/requirements/testing.txt b/requirements/testing.txt index 77421ff8..e9a0d28b 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -1,4 +1,4 @@ Jinja2>=2.0 coverage==3.6 nose==1.3.0 -flake8 +flake8==3.3.0