-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml.bak
56 lines (50 loc) · 2.46 KB
/
.travis.yml.bak
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
language: csharp
sudo: required
mono: none
solution: ./src/Telnyx.net.sln
dotnet: 3.1
cache:
directories:
- telnyx-mock
pip: false
env:
global:
- TELNYX_MOCK_VERSION=0.8.10
before_install:
# Unpack and start telnyx-mock so that the test suite can talk to it
- |
if [ ! -d "telnyx-mock/${TELNYX_MOCK_VERSION}" ]; then
mkdir -p telnyx-mock/${TELNYX_MOCK_VERSION}
curl -L "https://github.com/team-telnyx/telnyx-mock/releases/download/v${TELNYX_MOCK_VERSION}/telnyx-mock_${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -o "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz"
tar -zxf "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -C "telnyx-mock/${TELNYX_MOCK_VERSION}/"
fi
- |
telnyx-mock/${TELNYX_MOCK_VERSION}/telnyx-mock > /dev/null &
TELNYX_MOCK_PID=$!
- export PATH="${PATH}:${PWD}/telnyx-mock/${TELNYX_MOCK_VERSION}"
install:
- dotnet restore ./src/Telnyx.net.sln
before_script:
- export PATH=$PATH:/home/travis/.dotnet/tools
- |
curl -sL https://github.com/csMACnz/coveralls.net/releases/download/1.0.0/coveralls.net.1.0.0-linux.zip > coveralls.zip && \
unzip coveralls.zip -d coveralls && \
mv coveralls ./src/TelnyxTests && \
chmod +x ./src/TelnyxTests/coveralls/csmacnz.Coveralls && \
sudo ln -s ./src/TelnyxTests/coveralls/csmacnz.Coveralls /usr/bin/
script:
- dotnet build ./src/Telnyx.net.sln /clp:ErrorsOnly
- dotnet test ./src/TelnyxTests/TelnyxTests.csproj --configuration Release --framework netcoreapp3.1 /clp:ErrorsOnly
- REPO_COMMIT_AUTHOR=$(git show -s --pretty=format:"%cn")
- REPO_COMMIT_AUTHOR_EMAIL=$(git show -s --pretty=format:"%ce")
- REPO_COMMIT_MESSAGE=$(git show -s --pretty=format:"%s")
- echo $TRAVIS_COMMIT
- echo $TRAVIS_BRANCH
- echo $REPO_COMMIT_AUTHOR
- echo $REPO_COMMIT_AUTHOR_EMAIL
- echo $REPO_COMMIT_MESSAGE
- echo $TRAVIS_JOB_ID
- dotnet test ./src/TelnyxTests/TelnyxTests.csproj --configuration Release --framework netcoreapp3.1 /clp:ErrorsOnly /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --no-build
- COVERALLS_FILEPATH=$(find -type f -name '*opencover.xml')
- echo $COVERALLS_FILEPATH
- ./src/TelnyxTests/coveralls/csmacnz.Coveralls --opencover -i $COVERALLS_FILEPATH --repoToken $COVERALLS_REPO_TOKEN --commitId $TRAVIS_COMMIT --commitBranch $TRAVIS_BRANCH --commitAuthor "$REPO_COMMIT_AUTHOR" --commitEmail "$REPO_COMMIT_AUTHOR_EMAIL" --commitMessage "$REPO_COMMIT_MESSAGE" --jobId $TRAVIS_JOB_ID --serviceName "travis-ci" --useRelativePaths