This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/.travis.yml

115 lines
2.8 KiB
YAML
Raw Normal View History

2019-11-12 16:09:47 +00:00
---
language: python
python: 2.7
services:
- docker
install: true
branches:
only:
- master
# Stop default database instances here to avoid port conflicts.
before_script:
- sudo service mysql stop
- sudo service postgresql stop
# Clean the cache if any step fails.
before_cache:
- scripts/ci fail-clean
cache:
timeout: 1000
directories:
- $HOME/docker
stages:
2019-11-16 12:08:25 +00:00
- lint
2019-11-12 16:09:47 +00:00
- build
- test
- clean
# We should label the steps if Travis ever supports it:
# https://github.com/travis-ci/travis-ci/issues/5898
jobs:
2019-11-16 12:08:25 +00:00
allow_failures:
- python: 3.8
2019-11-12 16:09:47 +00:00
include:
2019-11-16 12:08:25 +00:00
- stage: lint
script:
- pip install flake8
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- stage: lint
python: 3.8
script:
- pip install black flake8
- black --check . || true # TODO: (cclauss) Remove "|| true" when ready
2019-11-16 12:08:25 +00:00
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
2019-11-12 16:09:47 +00:00
- stage: build
name: Build
script: scripts/ci build
# To further shard, change the script to shard_X_of_XS and add new steps
- stage: test
name: Unit tests (shard 1)
script: scripts/ci unit shard_1_of_2
- stage: test
name: Unit tests (shard 2)
script: scripts/ci unit shard_2_of_2
- stage: test
name: Registry tests (shard 1)
script: scripts/ci registry shard_1_of_5
- stage: test
name: Registry tests (shard 2)
script: scripts/ci registry shard_2_of_5
- stage: test
name: Registry tests (shard 3)
script: scripts/ci registry shard_3_of_5
- stage: test
name: Registry tests (shard 4)
script: scripts/ci registry shard_4_of_5
- stage: test
name: Registry tests (shard 5)
script: scripts/ci registry shard_5_of_5
- stage: test
name: Legacy registry tests
script: scripts/ci registry_old
- stage: test
name: Custom TLS certs test
script: scripts/ci certs_test
- stage: test
name: Gunicorn worker test
script: scripts/ci gunicorn_test
- stage: test
name: MySQL unit tests (shard 1)
script: scripts/ci mysql shard_1_of_2
- stage: test
name: MySQL unit tests (shard 2)
script: scripts/ci mysql shard_2_of_2
- stage: test
name: Postgres unit tests (shard 1)
script: scripts/ci postgres shard_1_of_2
- stage: test
name: Postgres unit tests (shard 2)
script: scripts/ci postgres shard_2_of_2
- stage: clean
name: Cleanup
script: scripts/ci clean
notifications:
slack:
rooms:
- secure: "fBR3YMXaOkoX2Iz7oSJVAw9zrcDoqwadiMEWTWhx7Ic0zoM8IieD2EWIcDHAoGpqf3ixHkc1v/iLBpbWHgvK7TkrSrGEbFyEmu/uomuHU8oGTiazWCbMWg9T2mhWYFyVaKtt8bzMbFo8k72kYK/NWV8bR4W/Qe/opkH2GGzfhZA="
on_success: change
on_failure: always
on_pull_requests: false