Push event #10678 canceled

  • Ran for
  • Total time
  • New branch build
language: ruby
dist: xenial
rvm: 2.5.3

cache:
  bundler: true

env:
  global:
  - COVERAGE=1
  matrix:
  - INTEGRATION_SPECS=0
  - INTEGRATION_SPECS=1

stages:
- test
- ':ship: it to Quay.io'

jobs:
  allow_failures:
  - script: ./script/docker-build-and-push
  include:
  - stage: test
    env:
    script: ./script/validate-example-payloads-with-docker
  - stage: ':ship: it to Quay.io'
    env:
    script: ./script/docker-build-and-push
    if: NOT type IN (pull_request) AND branch = master

before_script:
- eval "$(script/handle-docker-config)"
- bundle exec rake clean assets:precompile

script:
- bundle exec rspec spec
- bundle exec rake shfmt
- bundle exec rake assert_clean
- bundle exec rake shellcheck
- bundle exec rake assert_examples

after_success: bundle exec codeclimate-test-reporter

after_failure: bundle exec rake dump_examples_logs

before_deploy:
- sudo pip install -U -I Pygments
- ./script/build-s3-index-html

deploy:
  provider: s3
  access_key_id:
    secure: fXt5NG5UGDvpnRFvUUk9J//iSo+Vh28oEUJvjZqiUZ9GRHp5TrIS5vL4bPlD/1RrJRp7BVVj1+4ThXZRzrMhF5xazK8k4ANaUhMdjmRa6arXtqBcXIyUvu//5e80nlXekqMKaW7f5wrLNiKZB+ck7ayGlI1NYLNQ5nCWC6Xxe6s=
  secret_access_key:
    secure: Jn9clQh78C2c1zoueTkn0r5kSCHrbb7bMojb8/Ne+6zg0pD/3w25mrhEC4y9b3M/lHoKArOPj4dn03ZErJleM8aOMNMIa6ck8GKP+7EoFlZ/1/C5733HazlldTWDd2+wTOYfSIGOM+mHDP5tmK0S7pr1zEm+/++UExuGZXiCSSI=
  bucket: travis-build-examples
  local_dir: examples
  skip_cleanup: true
  region: us-east-1
  on:
    branch: master
    condition: $INTEGRATION_SPECS == 1
    repo: travis-ci/travis-build
maykinmedia/open-personen:.travis.yml@3d11c76
dist: xenial

language: python

cache: pip

python: 3.8

services:
  - postgresql

addons:
  postgresql: "10"

env:
  global:
  - DJANGO_SETTINGS_MODULE=openpersonen.conf.ci
  - SECRET_KEY=dummy
  - DB_PASSWORD=
  - DB_USER=postgres

install:
  - pip install -r requirements/ci.txt
  - pip install codecov
  - npm ci
  - npm run build

jobs:
  include:
    # Run jobs in parallel in stage Tests
    - stage: "Tests"
      name: "Unit tests"
      script:
        - python src/manage.py collectstatic --noinput --link
        - coverage run src/manage.py test src

    - name: "Code imports"
      before_install: skip
      install:
        - pip install isort
      before_script: skip
      script: isort . --check-only --diff

    - name: "Code format"
      before_install: skip
      install:
        - pip install black
      before_script: skip
      script: black --check src --diff

    - name: "Open API Check"
      install:
        - npm install openapi-diff
      script:
        - generate_schema
        - openapi-diff src/brp_openapi.yaml src/openapi.yaml

    - stage: "Docker image"
      name: Docker image build
      services:
        - docker
      install: skip
      script: docker build .
      deploy:
        - provider: script
          script: bin/docker_push.sh latest
          on:
            branch: master

        - provider: script
          script: bin/docker_push.sh $TRAVIS_TAG
          on:
            tags: true


after_success:
  - codecov
Build Config
{
  "os": [
    "linux"
  ],
  "env": {
    "global": [
      {
        "COVERAGE": "1"
      }
    ],
    "matrix": [
      {
        "INTEGRATION_SPECS": "0"
      },
      {
        "INTEGRATION_SPECS": "1"
      }
    ]
  },
  "rvm": [
    "2.5.3"
  ],
  "dist": "xenial",
  "cache": {
    "bundler": true
  },
  "deploy": [
    {
      "on": {
        "repo": "travis-ci/travis-build",
        "branch": [
          "master"
        ],
        "condition": [
          "$INTEGRATION_SPECS == 1"
        ]
      },
      "bucket": "travis-build-examples",
      "region": "us-east-1",
      "provider": "s3",
      "local_dir": "examples",
      "skip_cleanup": true,
      "access_key_id": {
        "secure": "fXt5NG5UGDvpnRFvUUk9J//iSo+Vh28oEUJvjZqiUZ9GRHp5TrIS5vL4bPlD/1RrJRp7BVVj1+4ThXZRzrMhF5xazK8k4ANaUhMdjmRa6arXtqBcXIyUvu//5e80nlXekqMKaW7f5wrLNiKZB+ck7ayGlI1NYLNQ5nCWC6Xxe6s="
      },
      "secret_access_key": {
        "secure": "Jn9clQh78C2c1zoueTkn0r5kSCHrbb7bMojb8/Ne+6zg0pD/3w25mrhEC4y9b3M/lHoKArOPj4dn03ZErJleM8aOMNMIa6ck8GKP+7EoFlZ/1/C5733HazlldTWDd2+wTOYfSIGOM+mHDP5tmK0S7pr1zEm+/++UExuGZXiCSSI="
      }
    }
  ],
  "matrix": {
    "include": [
      {
        "env": [
          {}
        ],
        "stage": "test",
        "script": [
          "./script/validate-example-payloads-with-docker"
        ]
      },
      {
        "if": "NOT type IN (pull_request) AND branch = master",
        "env": [
          {}
        ],
        "stage": ":ship: it to Quay.io",
        "script": [
          "./script/docker-build-and-push"
        ]
      }
    ],
    "allow_failures": [
      {
        "script": [
          "./script/docker-build-and-push"
        ]
      }
    ]
  },
  "script": [
    "bundle exec rspec spec",
    "bundle exec rake shfmt",
    "bundle exec rake assert_clean",
    "bundle exec rake shellcheck",
    "bundle exec rake assert_examples"
  ],
  "stages": [
    {
      "name": "test"
    },
    {
      "name": ":ship: it to Quay.io"
    }
  ],
  "language": "ruby",
  "after_failure": [
    "bundle exec rake dump_examples_logs"
  ],
  "after_success": [
    "bundle exec codeclimate-test-reporter"
  ],
  "before_deploy": [
    "sudo pip install -U -I Pygments",
    "./script/build-s3-index-html"
  ],
  "before_script": [
    "eval \"$(script/handle-docker-config)\"",
    "bundle exec rake clean assets:precompile"
  ]
}