Skip to content

Move tests to GitHub actions #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1b84c16
Refs #265. Initial attempt at using GH actions for tests
kylegibson May 19, 2025
c677ab9
Refs #265. Try using docker images for legacy pythons
kylegibson May 19, 2025
d42198e
Refs 265. No need to setup python now
kylegibson May 19, 2025
802bfea
Refs #265. Another try
kylegibson May 19, 2025
5ee0659
Refs #265. Install pydocx
kylegibson May 19, 2025
16e512e
Refs #265. Include defusedxml
kylegibson May 19, 2025
235eeb3
Refs #265. Can't test on python 2.6 for now
kylegibson May 19, 2025
95158fd
Try again with continue-on-error set and additional pythons to determ…
kylegibson May 19, 2025
4cc0190
Drop 3.10 for now
kylegibson May 19, 2025
498dace
Drop 3.3 and 3.4 and add back defusedxml
kylegibson May 19, 2025
b64a394
Refs #265. Try to test against python 2.7, 3.3 and 3.4
kylegibson May 19, 2025
6ca6394
Refs #265. Drop the defusedxml tests for now
kylegibson May 19, 2025
959f5dc
Refs #265. Fix typo
kylegibson May 19, 2025
7ecbefa
Refs #265. continue on error so I can see how they all fail
kylegibson May 19, 2025
ab0e8b3
Refs #265. Explicitly pin older packages compatible with these legacy…
kylegibson May 19, 2025
6f4d2e5
Refs #265. Pin flake8 to the version that was supported in Feb 2017
kylegibson May 19, 2025
22d5261
Refs #265. quote all the things
kylegibson May 19, 2025
2e6fd05
Refs #265. try using trusted host
kylegibson May 19, 2025
6b71feb
Refs #265. install all the testing deps manually since we cannot use …
kylegibson May 19, 2025
1c400d2
Refs #265. download and install importlib specifically for 2.6
kylegibson May 19, 2025
2547104
Refs #265. use non-slim for 3.3 and 3.4 because we need wget
kylegibson May 19, 2025
da0161c
Refs #265. Use sdist for nose 1.3.0 so we can install the same versio…
kylegibson May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Jinja2>=2.0
coverage==3.6
nose==1.3.0
flake8
flake8==3.3.0