-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathconfig.yml
152 lines (150 loc) · 5.68 KB
/
config.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
version: 2.0
jobs:
build_and_run_unit_tests:
working_directory: /build
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.1
auth:
username: ${DOCKERHUB_USER}
password: ${DOCKERHUB_PASSWORD}
steps:
- run:
name: Setup environment variables
command: echo "export CERTS_PATH=/build/certs" >> $BASH_ENV
- checkout
- run:
name: Setup proxy
command:
curl -sL https://art.sec.samsung.net/artifactory/tools/CircleCI/scripts/set_proxy_setting.sh | sh
- run:
name: Install xlstproc
command: apt update && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends xsltproc
- run:
name: Install yarn and nodejs
command: >
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&
apt update &&
DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends yarn nodejs
- run:
name: Bundle JuvoReactNative
command: >
cd JuvoReactNative && yarn && yarn bundle
- run:
name: Build solution
command: >
dotnet restore &&
dotnet build /nodeReuse:false -c Release
/p:"AuthorPath=${CERTS_PATH}/partner_2019.p12;AuthorPass=${AUTHOR_PASS}"
/p:"DistributorPath=${CERTS_PATH}/tizen-distributor-signer.p12;DistributorPass=${DISTRIBUTOR_PASS}"
- run:
name: Run unit tests
command: dotnet test /nodeReuse:false JuvoPlayer.Tests/JuvoPlayer.Tests.csproj --logger:trx -f netcoreapp3.1 --verbosity normal
- run:
name: Convert MSTest report to JUnit
command: >
mkdir -p TestResults &&
xsltproc -o TestResults/output.xml scripts/mstest-junit.xlst JuvoPlayer.Tests/TestResults/*
when: always
- store_test_results:
path: TestResults/
when: always
- run:
name: Copy artifacts to tmp directory
command: >
mkdir /tmp/artifacts &&
cp JuvoPlayer.TizenTests/bin/Release/tizen60/*.tpk /tmp/artifacts/ &&
cp JuvoPlayer.OpenGL/bin/Release/tizen60/*.tpk /tmp/artifacts/ &&
cp XamarinPlayer/XamarinPlayer.Tizen.TV/bin/Release/tizen60/*.tpk /tmp/artifacts &&
cp JuvoReactNative/Tizen/bin/Release/tizen60/*.tpk /tmp/artifacts
- store_artifacts:
path: /tmp/artifacts
destination: tpks
- persist_to_workspace:
root: .
paths:
- ./JuvoPlayer.TizenTests/bin/Release/tizen60/*.tpk
- ./scripts/nunit3-junit.xlst
- ./atr_tests/*
run_integration_tests:
working_directory: /build
docker:
- image: ubuntu
auth:
username: ${DOCKERHUB_USER}
password: ${DOCKERHUB_PASSWORD}
steps:
- attach_workspace:
at: /build
- add_ssh_keys:
fingerprints:
- "84:87:bf:67:e0:45:71:04:e7:97:2d:6d:fd:ca:01:67"
- run:
name: Setup environment variables
command: >
TPK_PATH=`find -name *.tpk` &&
TPK_NAME=`basename ${TPK_PATH}` &&
echo "export TPK_PATH=${TPK_PATH}" >> $BASH_ENV &&
echo "export TPK_NAME=${TPK_NAME}" >> $BASH_ENV
- run:
name: Install dependencies
command: >
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends xsltproc openssh-client
- run:
name: Run ATR tests
no_output_timeout: 20m
command: >
scp -o StrictHostKeyChecking=no ${TPK_PATH} ${ATR_RUNNER_USER}@${ATR_RUNNER_IP}:/tmp/ &&
scp -r -o StrictHostKeyChecking=no /build/atr_tests ${ATR_RUNNER_USER}@${ATR_RUNNER_IP}:/tmp/ &&
ssh -t -o StrictHostKeyChecking=no ${ATR_RUNNER_USER}@${ATR_RUNNER_IP} "cd /home/${ATR_RUNNER_USER}/weed/atr &&
rm -rf results &&
rm -rf atr_tests &&
mkdir atr_tests &&
cp -rf /tmp/atr_tests/* atr_tests &&
cp /tmp/${TPK_NAME} atr_tests &&
python3 atr_in_docker.py
--task-scenario JuvoPlayerTest
--tty ${TTY_DEV}
--irda-device ${IRDA_DEV}
--log-level debug
--dlog-tags JuvoPlayer UT DOTNET_LAUNCHER
--url ${IMAGE_URL}
--tizen ${TIZEN_VERSION}
--custom-docker-arguments=\"-v /home/${ATR_RUNNER_USER}/weed/atr/atr_tests:/root/atr/src/tests/juvo_player_test:ro\"
--board-version ${BOARD_VERSION}"
- run:
name: Download test results
command: scp -o StrictHostKeyChecking=no -r ${ATR_RUNNER_USER}@${ATR_RUNNER_IP}:/home/${ATR_RUNNER_USER}/weed/atr/results/* results/
when: always
- store_artifacts:
path: results
destination: results
when: always
- run:
name: Convert NUnit report to JUnit
command: >
mkdir -p TestResults &&
xsltproc -o TestResults/output.xml scripts/nunit3-junit.xlst
results/ATR_Task/JuvoPlayerTest/JuvoPlayerTest/JuvoPlayer.TizenTests.xml
when: always
- store_test_results:
path: TestResults/
when: always
workflows:
version: 2
commit:
jobs:
- build_and_run_unit_tests
nightly:
triggers:
- schedule:
cron: "0 1 * * *"
filters:
branches:
only:
- master
jobs:
- build_and_run_unit_tests
- run_integration_tests:
requires:
- build_and_run_unit_tests