-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
49 lines (43 loc) · 1.49 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
language: generic
before_install:
- export SWIFT_VERSION=$(<.swift-version)
- export SWIFT_DOCKER_IMAGE=swift:${SWIFT_VERSION}-bionic
stages:
- name: test
if: tag IS NOT present
jobs:
include:
- stage: test
name: Unit Tests
os: linux
dist: bionic
services: docker
script:
- bash <(curl -s https://asensei.github.io/scripts/init-docker-credential-pass.sh)
- echo "${DOCKER_ACCESS_TOKEN}" | docker login --username asenseici --password-stdin
- docker pull ${SWIFT_DOCKER_IMAGE} && docker logout
- args="swift build -c debug
&& swift build -c release
&& swift test -c debug --sanitize=thread"
- docker run --rm -v $(pwd):/app -v ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent --workdir /app ${SWIFT_DOCKER_IMAGE} bash -c "${args}"
- stage: test
name: Unit Tests
os: osx
osx_image: xcode13.4
before_script:
- gem install bundler
- bundle install
- brew update
- brew tap vapor/tap && brew install vapor
- brew outdated swiftlint || brew upgrade swiftlint
script:
- swift --version
- swift build -c debug
- swift build -c release
- swift test -c debug --enable-code-coverage --sanitize=thread
- swiftlint
- bash <(curl -s https://asensei.github.io/scripts/codecov.sh)
notifications:
email:
on_success: never
on_failure: change