-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Shoobx/adamg-ghaci
moving CI to github actions
- Loading branch information
Showing
9 changed files
with
339 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[run] | ||
include = */shoobx/rml2odt/* | ||
omit = */test* | ||
|
||
relative_files = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.