diff --git a/.circleci/config.yml b/.circleci/config.yml index 2dd45dc..6ca205b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,10 @@ jobs: - run: sudo make deps-ubuntu - run: make install - run: make deps-test - - run: make test + - run: mkdir test-results + - run: make test PYTEST_ARGS=--junitxml=test-results/test.xml + - store_test_results: + path: test-results - run: make test-cli - run: make coverage - codecov/upload @@ -42,6 +45,15 @@ jobs: command: echo "$DOCKERHUB_PASS" | docker login --username "$DOCKERHUB_USER" --password-stdin - run: docker push $DOCKER_TAG + deploy-pypi: + docker: + - image: ocrd/tesserocr + steps: + - checkout + - run: pip install twine build + - run: python -m build . + - run: twine upload dist/* + workflows: build: @@ -51,8 +63,17 @@ workflows: parameters: python-version: ['3.7', '3.8', '3.9', '3.10'] deploy: + when: + condition: + equal: [ https://github.com/OCR-D/ocrd_tesserocr, << pipeline.project.git_url >>] jobs: - deploy-docker: filters: branches: only: master + - deploy-pypi: + requires: + - deploy-docker + filters: + branches: + only: master diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 99426c2..49cb747 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,7 +6,7 @@ on: branches: [ "master" ] env: - IMAGE_NAME: ghcr.io/ocr-d/tesserocr + IMAGE_NAME: ghcr.io/${{ github.repository }} jobs: diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..4744cce --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include ocrd-tool.json +include README.md +include requirements.txt