Skip to content

Commit eeef0b3

Browse files
authored
run unit test on ci (#179)
configured running unit test on travis and appveyor
1 parent 37a23c8 commit eeef0b3

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

.travis.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
language: csharp
22
solution: SimplCommerce.sln
3-
4-
matrix:
5-
include:
6-
- os: osx
7-
dotnet: 1.0.0
8-
mono: none
9-
env: DOTNETCORE=1
10-
- os: linux
11-
dist: trusty
12-
sudo: required
13-
dotnet: 1.0.0
14-
mono: none
15-
env: DOTNETCORE=1
3+
sudo: required
4+
dist: trusty
5+
dotnet: 1.0.0
6+
mono: none
7+
os:
8+
- linux
9+
- osx
1610

1711
branches:
1812
only:
@@ -23,5 +17,9 @@ notifications:
2317
on_success: change
2418
on_failure: always
2519

20+
before_script:
21+
- dotnet restore
22+
2623
script:
27-
- if [ -n "${DOTNETCORE}" ]; then dotnet restore && dotnet build ./SimplCommerce.sln; fi
24+
- dotnet build ./SimplCommerce.sln
25+
- ./run-tests.sh

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ init:
33
- git config --global core.autocrlf true
44
before_build:
55
- appveyor-retry dotnet restore -v Minimal
6-
test: off
6+
test: on
7+
test_script:
8+
- ps: .\run-tests.ps1
79
deploy: off

run-tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Get-ChildItem "test" | ?{ $_.PsIsContainer } | %{
2+
pushd "test\$_"
3+
& dotnet test
4+
popd
5+
}

run-tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
echo ""
4+
echo "Run tests..."
5+
echo ""
6+
7+
for test in ./test/*/
8+
do
9+
echo "Testing $test"
10+
pushd "$test"
11+
dotnet test
12+
popd
13+
done

0 commit comments

Comments
 (0)