1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
stages:
- test
- deploy
.unit-test: &unit
stage: test
image: python:3
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- python -V
- pip install -r requirements.txt
- pip install -e .
script:
tox --skip-missing-interpreters -- -qqrf
test-optional:
<<: *unit
script:
tox -e lxml,nolxml,pandas,numpy,nopillow,xfail,defusedxml,keep_vba
test-docs:
<<: *unit
script:
- apt-get update && apt-get install -y --no-install-recommends zip
- tox -e doc,doctest
- zip -r docs.zip .tox/doc/tmp/html
artifacts:
paths:
- docs.zip
test-python38:
<<: *unit
image: python:3.8
variables:
TOXENV: py38
test-python39:
<<: *unit
image: python:3.9
variables:
TOXENV: py39
test-python310:
<<: *unit
image: python:3.10
variables:
TOXENV: py310
test-python311:
<<: *unit
image: python:3.11
variables:
TOXENV: py311
test-python312:
<<: *unit
image: python:3.12
variables:
TOXENV: py312
# test-python313:
# <<: *unit
# image: python:3.13-rc
# variables:
# TOXENV: py313
# test-pypy3:
# <<: *unit
# image: pypy:3
# variables:
# TOXENV: pypy3
test-coverage:
<<: *unit
script:
- export GIT_ID=$(hg tip --template '{node}\n')
- export GIT_AUTHOR_NAME=$(hg tip --template '{author|person}\n')
- export GIT_AUTHOR_EMAIL=$(hg tip --template '{author|email}\n')
- export GIT_COMMITTER_NAME=$(hg tip --template '{author|person}\n')
- export GIT_COMMITTER_EMAIL=$(hg tip --template '{author|email}\n')
- export GIT_MESSAGE=$(hg tip --template '{desc}\n')
- export GIT_BRANCH=$(hg branch)
- export GIT_URL=https://foss.heptapod.net/openpyxl/openpyxl
- tox -e cov
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
pages:
stage: deploy
image: python:3
script:
- unzip docs.zip
- mv .tox/doc/tmp/html public
artifacts:
paths:
- public
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|