Removing travis in favor of github actions

This commit is contained in:
Mark Schmitt 2020-12-31 13:24:57 +01:00
parent ba9b5c50d2
commit b855222ee1

View File

@ -1,153 +0,0 @@
language: python
dist: focal
os: linux
stages:
- name: test
- name: build_docker
if: branch =~ /^(master|dev|ng-.*)$/
- name: publish_manifest
if: branch =~ /^(master|dev|ng-.*)$/
jobs:
include:
- name: "Paperless on Python 3.6"
stage: test
python: "3.6"
- name: "Paperless on Python 3.7"
stage: test
python: "3.7"
- name: "Paperless on Python 3.8"
stage: test
python: "3.8"
- name: "Documentation"
stage: test
script:
- cd docs/
- make html
after_success: true
- name: "Front end"
stage: test
language: node_js
node_js:
- 15
before_install: true
install:
- cd src-ui/
- npm install -g @angular/cli
- npm install
script:
- ng build --prod
after_success: true
- stage: build_docker
name: amd64 docker build
services:
- docker
before_install:
- true
install:
- true
after_success:
- true
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -f Dockerfile --tag=${DOCKER_REPO}:${TRAVIS_COMMIT}-amd64 .
- docker push ${DOCKER_REPO}:${TRAVIS_COMMIT}-amd64
- stage: build_docker
name: arm64v8 docker build
services:
- docker
before_install:
- true
install:
- true
after_success:
- true
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# travis_wait 60 tells travis to wait for up to 60 minutes - default is 20, which is too short
- travis_wait 60 docker build -f Dockerfile --tag=${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8 .
- docker push ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8
arch: arm64-graviton2
virt: vm
group: edge
- stage: build_docker
name: arm32v7 docker build
services:
- docker
before_install:
- true
install:
- true
after_success:
- true
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# register binfmt stuff for qemu-static binaries so we can use userland-emulation
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# replace the multi-arch reference with a specific, arm32v7 version. else docker will use the platform specific one,
# which is amd64.
- sed -i "s/FROM node:15/FROM node@$(docker manifest inspect node:15 | jq -r '.manifests [] | select (.platform.variant == "v7") | .digest')/g" Dockerfile
- sed -i "s/FROM python:3.7-slim/FROM python@$(docker manifest inspect python:3.7-slim | jq -r '.manifests [] | select (.platform.variant == "v7") | .digest')/g" Dockerfile
# travis_wait 60 tells travis to wait for up to 60 minutes - default is 20, which is too short
- travis_wait 60 docker build -f Dockerfile --tag=${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7 .
- docker push ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7
env:
- DOCKER_CLI_EXPERIMENTAL=enabled # required for manifest support
- stage: publish_manifest
env:
- DOCKER_CLI_EXPERIMENTAL=enabled # required for manifest support
services:
- docker
before_install:
- true
install:
- true
after_success:
- true
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker manifest create ${DOCKER_REPO}:${TRAVIS_COMMIT} ${DOCKER_REPO}:${TRAVIS_COMMIT}-amd64 ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8 ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7
- docker manifest annotate ${DOCKER_REPO}:${TRAVIS_COMMIT} ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7 --os linux --arch arm --variant v7
- docker manifest annotate ${DOCKER_REPO}:${TRAVIS_COMMIT} ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8 --os linux --arch arm64 --variant v8
- docker manifest push --purge ${DOCKER_REPO}:${TRAVIS_COMMIT}
- |
if [ "${TRAVIS_BRANCH}" = "master" ]; then
echo "Master branch detected"
DOCKER_TAG="latest"
else
DOCKER_TAG=${TRAVIS_TAG}
fi
- |
if [ "${DOCKER_TAG}" != "" ]; then
echo "Create Tag ${DOCKER_TAG}"
docker manifest create ${DOCKER_REPO}:${DOCKER_TAG} ${DOCKER_REPO}:${TRAVIS_COMMIT}-amd64 ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8 ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7
docker manifest annotate ${DOCKER_REPO}:${DOCKER_TAG} ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm32v7 --os linux --arch arm --variant v7
docker manifest annotate ${DOCKER_REPO}:${DOCKER_TAG} ${DOCKER_REPO}:${TRAVIS_COMMIT}-arm64v8 --os linux --arch arm64 --variant v8
docker manifest push --purge ${DOCKER_REPO}:${DOCKER_TAG}
else
echo "Not a tag and not on master, so not pushing tag/master specific manifest"
fi
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng
install:
- pip install --upgrade pipenv
- pipenv install --system --dev
script:
- cd src/
- pipenv run pytest --cov
- pipenv run pycodestyle
after_success:
- pipenv run coveralls