Skip to content

Commit

Permalink
Merge pull request #29 from Shoobx/adamg-ghaci
Browse files Browse the repository at this point in the history
moving CI to github actions
  • Loading branch information
agroszer committed Feb 23, 2023
2 parents e0a6a97 + 059b855 commit 741b9b5
Show file tree
Hide file tree
Showing 9 changed files with 339 additions and 257 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[run]
include = */shoobx/rml2odt/*
omit = */test*

relative_files = True
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: shoobx.rml2odt

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
workflow_dispatch:

jobs:
test:
# nail ubuntu version here, fonts can change that will affect ODT rendering,
# causing image mismatches
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:

- name: Check out source
uses: actions/checkout@v3

- name: Install Libreoffice and ghostscript
run: |
sudo apt-get update
sudo apt-get install --yes libreoffice
sudo apt-get install --yes ghostscript
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox

- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
if: matrix.python-version == 3.11
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ CHANGES
0.8.1 (unreleased)
------------------

- Nothing changed yet.
- Moving CI to github actions

- Python 3.9, 3.10, 3.11 compatibility


0.8.0 (2020-12-08)
Expand Down
26 changes: 18 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
PYTHON = python3.7
PYTHON = python3.10
VIRTUALENV = ve

all: env ve

ve:
virtualenv -p $(PYTHON) ve
ve/bin/pip install -e .[test]
$(PYTHON) -m venv $(VIRTUALENV); \
$(VIRTUALENV)/bin/pip install --upgrade setuptools; \
$(VIRTUALENV)/bin/pip install --upgrade wheel

$(VIRTUALENV)/bin/pip install -e .[test]

env:
echo /usr/bin/python3 > env

.PHONY: test
test: ve
ve/bin/zope-testrunner -vpc1 --all --test-path=${PWD}/src
test: ve env
$(VIRTUALENV)/bin/zope-testrunner -vvc1 --all --test-path=${PWD}/src

.PHONY: coverage
coverage: ve
bin/coverage run ve/bin/zope-testrunner -vpc1 --all --test-path=${PWD}/src
bin/coverage html
coverage: ve env
$(VIRTUALENV)/bin/coverage run $(VIRTUALENV)/bin/zope-testrunner -vpc1 --all --test-path=${PWD}/src
$(VIRTUALENV)/bin/coverage html

clean:
rm -rf ve .tox .coverage coverage.xml

clean-expected:
rm -f ./src/shoobx/rml2odt/tests/z3c_rml_tests/expected/*.png
rm -f ./src/shoobx/rml2odt/tests/z3c_rml_tests/expected/*.pdf
rm -f ./src/shoobx/rml2odt/tests/test_data/expected/*.png
rm -f ./src/shoobx/rml2odt/tests/test_data/expected/*.pdf
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
``shoobx.rml2odt`` -- Conversion of RML to ODT
================================================

.. image:: https://travis-ci.org/Shoobx/shoobx.rml2odt.png?branch=master
:target: https://travis-ci.org/Shoobx/shoobx.rml2odt
.. image:: https://github.com/Shoobx/shoobx.rml2odt/actions/workflows/test.yml/badge.svg
:target: https://github.com/Shoobx/shoobx.rml2odt/actions

.. image:: https://coveralls.io/repos/github/Shoobx/shoobx.rml2odt/badge.svg?branch=master
:target: https://coveralls.io/github/Shoobx/shoobx.rml2odt?branch=master
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def alltests():
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Natural Language :: English',
'Operating System :: OS Independent'],
Expand Down

0 comments on commit 741b9b5

Please sign in to comment.