-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
71 lines (56 loc) · 3.66 KB
/
.travis.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# TODO: Deprecated, remove after transition to GH Actions is complete
language: minimal
env:
global:
- secure: VndZQDxw463ynheGhUHjgU8nj9JpuE8AwVSXaoR/mSceL7cS38gTTiVAWOLVgbXDu3KFnzR0SD0qwTyXb3nuDh9NMkv1qTrSZipgPkerzGddAhxuwGAuD+eIdL7uRgFm2UUETGxfGdXw/OxfuDV/mgDWS8Kf52GCeUuZOp5cj3CWfCkPi8N/O6Ba7Y1OkhzF8y90BWcsk5ZhN4Upa4GK+tjI/gJ8O3CP77itrBD6ttunBrFQvsqv3RgsyA/Zf52nJXr90eDHlSxMMnstGmZJerGOApDuNCA++gZA+vNMNB1W5NojzCJVAnIG6VM1Y5gUMRNnDOC41glsY4lkrI+OfIPAzO3zG814M8cRwKCb0b8b3KC8KS88uWDn4nS5WMSDNzQx8J00aU99sBtzdHEyEcwsl5k/ZAEY+F/kYW43HFbp2gYLROnC0iokqKCuVWdXbtupbmCQblKwSDJSzt5wkIY9rTeb2J6LKB1dsDwp0i+illqE7axtLTPpTkZ/rl9tXn4xqJIsdmtwy13RtDHRkFbqLqMFe7ZzHvl53p6pGykBqWJ1yWU0mmJ+lFll2STY8kOOqdL2LbV56QvTS4K5GZyzKYhBkRJot2lazNztG8EsTeJ4M90rWgbIBs3hWsZrtAb/W9lSFx9Ei5q5SsS07Y41Mogj4K26K/2e+D70T8E=
- secure: B6XiFb6QjgmLtBhZ/o1921dsMpe66+1EeaDA06tuu41jtKWpveC9tcWL+1s8yMuHy9VVh2vADAID8vSSnkeCnrb7GZIpTtgtXg6bz2dfIEXVaXO2KWPrj/yf1oNtQ6yM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SpkVuydWkXxjpXZ3mo47lZomJy354RW3nRs4pfmz99o5IVjeLPqUiElXA9tkFu4yzRB5L1K+LUxwnLy1SX79BvA06rQBkqXRt5TBidtow3LcxpfrqwP0Eoop6GnoiPhbez3ZUnp3hgskAZovqCKaPzsc="
stages:
- test
- deploy
jobs:
include:
- name: macos spm test
stage: test
os: osx
osx_image: xcode11.5
script: make test-macos-spm
- name: macos xcode test
stage: test
os: osx
osx_image: xcode11.5
script: make test-macos-xcode
after_success:
# upload coverage data
- bash <(curl -s https://codecov.io/bash) -J '^ResterCore$' -D .build/derivedData
- name: docker spm test
stage: test
os: linux
dist: trusty
script: |
set -e
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
VERSION=${TRAVIS_TAG:-$TRAVIS_COMMIT}
IMAGE=finestructure/rester:base-$VERSION
docker build --pull -t $IMAGE -f Dockerfile.base .
docker run --rm -e GITHUB_TOKEN=$GITHUB_TOKEN $IMAGE swift test --parallel
docker push $IMAGE
- name: push app image
stage: deploy
os: linux
dist: trusty
script: |
set -e
# login
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# build
VERSION=${TRAVIS_TAG:-$TRAVIS_COMMIT}
IMG=finestructure/rester:$VERSION
docker build --pull -t $IMG -f Dockerfile.app --build-arg VERSION=$VERSION .
# test image
docker run --rm $IMG --version
# push IMG
docker push $IMG
# tag and push latest
docker tag $IMG finestructure/rester:latest
docker push finestructure/rester:latest