--- steps: test: image: python:3.11-bookworm group: test commands: - pip3 install -e .[test] - python3 -m coverage run --rcfile=setup.cfg -m unittest discover matemat - python3 -m coverage combine - python3 -m coverage report --rcfile=setup.cfg codestyle: image: python:3.11-bookworm group: test commands: - pip3 install -e .[test] - pycodestyle matemat build_wheel: image: python:3.11-bookworm group: package when: - event: tag secrets: - GITEA_API_REPOSITORY_PYPI - GITEA_API_USERNAME - GITEA_API_PASSWORD commands: - pip3 install -e .[test] - python3 setup.py egg_info bdist_wheel - | cat > ~/.pypirc <" | grep -B 1000 "<"'!'"-- END CHANGES $${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' echo "\n -- s3lph@kabelsalat.ch $(date -R)\n" done) > package/debian/matemat/usr/share/doc/matemat/changelog - gzip -9n package/debian/matemat/usr/share/doc/matemat/changelog - cp -r static/ package/debian/matemat/usr/lib/matemat/static/ - cp -r templates/ package/debian/matemat/usr/lib/matemat/templates/ - mkdir -p package/debian/matemat/var/lib/matemat/themes/ - cp -r themes/ package/debian/matemat/usr/lib/matemat/themes/ - python3 setup.py egg_info install --root=package/debian/matemat/ --prefix=/usr --optimize=1 - cd package/debian - mkdir -p matemat/usr/lib/python3/dist-packages/ - rsync -a matemat/usr/lib/python3.11/site-packages/ matemat/usr/lib/python3/dist-packages/ - rm -rf matemat/usr/lib/python3.11/ - find matemat/usr/lib/python3/dist-packages -name __pycache__ -exec rm -r {} \; 2>/dev/null || true - find matemat/usr/lib/python3/dist-packages -name '*.pyc' -exec rm {} \; - mv matemat/usr/bin/matemat matemat/usr/lib/matemat/matemat - rm -rf matemat/usr/bin - sed -re 's$#!/usr/local/bin/python3$#!/usr/bin/python3$' -i matemat/usr/lib/matemat/matemat - find matemat -type f -exec chmod 0644 {} \; - find matemat -type d -exec chmod 755 {} \; - chmod +x matemat/usr/lib/matemat/matemat matemat/DEBIAN/postinst matemat/DEBIAN/prerm matemat/DEBIAN/postrm - sed -re "s/__VERSION__/$${MATEMAT_VERSION}-1/g" -i matemat/DEBIAN/control - dpkg-deb --build matemat - mv matemat.deb "matemat_$${MATEMAT_VERSION}-1_all.deb" - sudo -u nobody lintian "matemat_$${MATEMAT_VERSION}-1_all.deb" || true - >- curl --user "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}" --upload-file "matemat_$${EXPORTER_VERSION}-1_all.deb" $${GITEA_API_REPOSITORY_DEB}