From 8612a971e6ef6e963533d1115353dc47b7f6add0 Mon Sep 17 00:00:00 2001 From: wesleybalvanz-wf Date: Mon, 23 May 2022 15:40:44 -0500 Subject: [PATCH 1/4] Add skynet.yaml --- .gitignore | 3 +++ run_tests.sh | 16 ++++++++++++++++ skynet.yaml | 12 ++++++++++++ 3 files changed, 31 insertions(+) create mode 100755 run_tests.sh create mode 100644 skynet.yaml diff --git a/.gitignore b/.gitignore index 5ee9fbf..14e6df7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ doc/api/ # JetBrains IDEs .idea/ + +# Directory created by w_test_tools to hold test reports +test-reports/ \ No newline at end of file diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..b7121e2 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -ex + +RESULT=0 + +filename="test-reports/test_output" + +pub get + +pub run test --file-reporter=json:$filename.json || RESULT=1 + +# pub run w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml" + +# rm "$filename.json" + +exit $RESULT \ No newline at end of file diff --git a/skynet.yaml b/skynet.yaml new file mode 100644 index 0000000..78aa3ef --- /dev/null +++ b/skynet.yaml @@ -0,0 +1,12 @@ +name: unit-tests +description: Unit tests +contact: 'Frontend Frameworks Architecture / #support-frontend-architecture' +image: drydock.workiva.net/workiva/dart_unit_test_image:1 +size: large +timeout: 600 + +artifacts: /testing/test-reports +test-reports: /testing/test-reports + +scripts: + - /testing/run_tests.sh \ No newline at end of file From 9cf8f24a7eb84d0f25112b15e67fbc10bf471905 Mon Sep 17 00:00:00 2001 From: wesleybalvanz-wf Date: Tue, 24 May 2022 15:28:30 -0500 Subject: [PATCH 2/4] Use global version of w_test_tools --- run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index b7121e2..da5f613 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -9,8 +9,8 @@ pub get pub run test --file-reporter=json:$filename.json || RESULT=1 -# pub run w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml" +w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml" -# rm "$filename.json" +rm "$filename.json" exit $RESULT \ No newline at end of file From e9bf1aab381fbea3613d15a1cd1fdeed73bd7f36 Mon Sep 17 00:00:00 2001 From: wesleybalvanz-wf Date: Tue, 24 May 2022 15:34:42 -0500 Subject: [PATCH 3/4] Try dart pub global run --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index da5f613..b4ad0df 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -9,7 +9,7 @@ pub get pub run test --file-reporter=json:$filename.json || RESULT=1 -w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml" +dart pub global run w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml" rm "$filename.json" From ea4ca319b14f3b4b9a3a70acf17162418e1c9a16 Mon Sep 17 00:00:00 2001 From: wesleybalvanz-wf Date: Tue, 24 May 2022 16:03:52 -0500 Subject: [PATCH 4/4] Switch pub to dart pub and dart test --- run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index b4ad0df..69087f2 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -5,9 +5,9 @@ RESULT=0 filename="test-reports/test_output" -pub get +dart pub get -pub run test --file-reporter=json:$filename.json || RESULT=1 +dart test --file-reporter=json:$filename.json || RESULT=1 dart pub global run w_test_tools:xunit_parser -j "$filename.json" -t "$filename.xml"