redash-ui-tests/.circleci/config.yml

97 строки
2.6 KiB
YAML

version: 2.0
jobs:
build-deploy: # build for the master branch
machine: true
working_directory: ~/redash-ui-tests
steps:
- checkout
- run:
name: Build docker image and push to repo
command: |
docker version
make build
docker tag redash-ui-tests mozilla/redash-ui-tests:latest
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
docker push mozilla/redash-ui-tests:latest
build-release: # build for tags
machine: true
working_directory: ~/redash-ui-tests
steps:
- checkout
- run:
name: Build docker image and push to repo
command: |
docker version
make build
docker tag redash-ui-tests "mozilla/redash-ui-tests:${CIRCLE_TAG}"
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
docker push "mozilla/redash-ui-tests:${CIRCLE_TAG}"
integration_tests:
working_directory: ~/redash-ui-tests
machine: true
steps:
- checkout
- run:
name: Install Docker Compose
command: |
set -x
pip install docker-compose>=1.18
docker-compose --version
- run:
name: Pull images and build ui-tests image
command: |
set -x
docker-compose up -d
sleep 20
- run:
name: Start container and setup redash instance
command: |
docker-compose ps
make setup-redash
- run:
name: Run tests
command: |
make docker-ui-tests
- store_artifacts:
path: report.html
code_quality:
working_directory: ~/redash-ui-tests
docker:
- image: circleci/python:3.6.5
steps:
- checkout
- run:
name: Install dependencies
command: |
pip install pipenv
pipenv install --dev
- run:
name: Flake8
command: make flake8
- run:
name: Formatting check
command: make formatting
- run:
name: Static type check
command: make mypy
workflows:
version: 2
build_test_deploy_release:
jobs:
- build-deploy:
requires:
- integration_tests
filters:
branches:
only: master
- build-release:
requires:
- integration_tests
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- integration_tests
- code_quality