summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 1ab73f5d69e5c17238328dd83304efb673908e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
language: generic

dist: bionic

services:
  - docker

jobs:
  include:
    - stage: lint
      language: go
      go: "1.14"
      services: []
      cache:
        directories:
          - $HOME/.cache/pip
          - $HOME/.cache/pre-commit
      before_install: []
      script:
        - pyenv shell 3.8
        - pip3 install "$(grep ^pre-commit test/requirements-dev.txt)"
        - pre-commit run --all-files --color=always
    - stage: test
      env: DIST=alpine
    - env: DIST=centos7
    - env: DIST=debian10
    - env: DIST=fedoradev
    - env: DIST=ubuntu14
    - env: DIST=ubuntu14 BSD=true NETWORK=none

before_install:
  - docker build
    --build-arg DIST=$DIST -t bash-completion:$DIST -f test/docker/Dockerfile .

script:
  - docker run --name bash-completion
      -e CI=true -e DIST=$DIST -e BSD=$BSD -e NETWORK=$NETWORK
      ${NETWORK:+--network $NETWORK}
      -t bash-completion:$DIST

before_deploy:
  - docker start bash-completion
  - docker exec bash-completion
      sh -c "tar c bash-completion-$TRAVIS_TAG.tar.*" | tar xv
  - docker kill bash-completion

deploy:
  provider: releases
  api_key:
    secure: MoK9nzmS6CBzPPIrhC0Ch6hIB3zEzLqZE6k4axoCyz/wmJFLJgX9OCq5K8zS4Jv8NuaA2C1YTcr+m56IO9N0RTmIWrS4q40fLIhKlYv6255u+wXMkGfqXbiFAZG5yndhUo8NE6QXAtixd3nQ/3/MOt2PdsOn+OdxTDmcPSXaW/ltkd/fMHynWzupdyRJ1v46IofPBrjsC1pTzW0iVqVHz64Ix3kPVjjPR9BMHzgKMJ8sPWBGZtF2ovjwsTHYPSpEyytVRecqrmEjM6QBCgfhQDqH87jOw6Y81xh1fWDCoxaZw7HlEcQ+HeHOkDdA24AYaxVoYXrKdIDXUXWt8w674Po7UWB6kIUn3J59Xaw60Sp4VaN88Y2eX9UKRcoDRHLWc8HKt4f9AUDR9YpFF08N+gKRmJFt9mCxqeJ+pyYD/coHGkGb8XvewTKihCSuH/qCWjM8XqM493DLDlJ5aELgMEcJXPXX4TmjsriOeErTY1qxRTRHJPmfUJ/kHtmpE+DxNXpwZOnyG+VoO5aEaIKbzHxX9QzWyyEhTflupdatZ2JFt1pmVDpwH9zcEifBwE0cUwhXk+LJuxHd5ePIIpvepAAnXKaxlYwchj4cFaJp7S9GZoAQughgQQkyfz0qr3J6hBhg360QAq4yjPOWjGgGz4iAG8kWd3MVXLvL+TtfBeY=
  file: bash-completion-$TRAVIS_TAG.tar.xz
  skip_cleanup: true
  on:
    repo: scop/bash-completion
    condition: $DIST = alpine
    tags: true