-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (48 loc) · 1.41 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
language: generic
before_install:
- export SWIFT_VERSION=$(<.swift-version)
- export MONGODB_VERSION=ubuntu2204-7.0.2
- export MONGOSH_VERSION=2.0.2-linux-x64
- export SWIFT_DOCKER_IMAGE=swift:${SWIFT_VERSION}-bionic
- export [email protected]
stages:
- name: test
if: tag IS NOT present
jobs:
include:
- stage: test
name: Unit Tests
os: linux
dist: jammy
services: docker
script:
- ./Scripts/mongo_setup.sh &
- docker pull ${SWIFT_DOCKER_IMAGE}
- args="apt-get update
&& apt-get -y install cmake libssl-dev libsasl2-dev
&& swift build -c debug
&& swift build -c release
&& swift test -c debug --sanitize=thread";
- docker run --rm --net=host -v $(pwd):/app --workdir /app ${SWIFT_DOCKER_IMAGE} bash -c "${args}"
- stage: test
name: Unit Tests
os: osx
osx_image: xcode14.2
before_script:
- gem install bundler
- bundle install
- brew update
- brew tap mongodb/brew
- brew install ${MONGO_BREW_VERSION}
- brew services start ${MONGO_BREW_VERSION}
- brew outdated swiftlint || brew upgrade swiftlint
script:
- swift --version
- swift build
- swift build -c release
- swift test
- swiftlint
notifications:
email:
on_success: never
on_failure: change