-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (28 loc) · 2.18 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
sudo: required
services:
- docker
branches:
only:
- master
- release
- dev
- /^.*-wip$/
- /^(.*\/)?ci-.*$/
before_install:
- docker run --name mysql -e MYSQL_ROOT_PASSWORD=Password12! -d mysql:5.7
- docker run -v $(pwd):/dotnet/:rw -e 'CI=True' --name dotnet --link mysql:mysql -d microsoft/dotnet:2.0.0-sdk sh -c 'while true; do sleep 0.1; done'
- cp test/EFCore.MySql.FunctionalTests/appsettings.ci.json test/EFCore.MySql.FunctionalTests/appsettings.json
script:
- docker exec -it dotnet sh -c 'cd /dotnet && dotnet restore'
- docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.Tests && dotnet xunit -c Release'
- echo "Building migrations" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && cp config.json.example config.json && sed -i "s/127.0.0.1/mysql/g" config.json && ./scripts/rebuild.sh'
- echo "Test applying migrations" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && dotnet run -c Release testMigrate'
- echo "Test scaffolding" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && ./scripts/scaffold.sh; rc=$?; rm -rf Scaffold; exit $rc'
- echo "Test with EF_BATCH_SIZE=1" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && dotnet xunit -c Release'
- echo "Test with EF_BATCH_SIZE=10" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && export EF_BATCH_SIZE=10 && dotnet xunit -c Release'
- echo "Test with EF_RETRY_ON_FAILURE=3" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && export EF_RETRY_ON_FAILURE=3 && dotnet xunit -c Release'
- echo "Test legacy migrations" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && ./scripts/legacy.sh'
- echo "Building migrations with EF_DATABASE=pomelo_test2" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && export EF_SCHEMA=pomelo_test2 && ./scripts/rebuild.sh'
- echo "Test with EF_SCHEMA=pomelo_test2" && docker exec -it dotnet sh -c 'cd /dotnet/test/EFCore.MySql.FunctionalTests && export EF_SCHEMA=pomelo_test2 && dotnet xunit -c Release'
notifications:
email: false