Skip to content

Commit

Permalink
Merge pull request OCA#483 from acsone/fix-docutil-pip-issue
Browse files Browse the repository at this point in the history
Change docutils version and move to GitHub actions
  • Loading branch information
sbidoul committed Dec 9, 2020
2 parents f1b5595 + 1b9a5ad commit b9c963d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 17 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
pull_request:
push:

jobs:
tests:
name: "Test with python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.8"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: python -m pip install tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: python -m tox
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install coveralls
coveralls
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# We need to pin docutils version, see
# https://github.com/OCA/maintainer-tools/issues/423
# Consider carefully before changing this.
'docutils>=0.15.1,<0.15.1.1',
'docutils==0.16.*',
'ERPpeek',
'github3.py>=1',
'inflection',
Expand Down
9 changes: 9 additions & 0 deletions tools/gen_addon_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,15 @@ def gen_one_addon_index(readme_filename):
writer_name='html4css1',
settings_overrides=RST2HTML_SETTINGS,
)
with open(index_filename, "rb") as f:
index = f.read()
# remove the docutils version from generated html, to avoid
# useless changes in the readme
index = re.sub(
rb'(<meta.*generator.*Docutils)\s*[\d.]+', rb"\1", index, re.MULTILINE
)
with open(index_filename, "wb") as f:
f.write(index)
return index_filename


Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ deps =
pytest
pytest-cov
pytest-flake8

[gh-actions]
python =
3.6: py36
3.8: py38

0 comments on commit b9c963d

Please sign in to comment.