@@ -302,7 +302,7 @@ jobs:
302302 name : .AppImage tests
303303 command : |
304304 cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.ts" | circleci tests split) && cd ../..
305- .circleci/scripts/ e2e/app-image.e2e .sh
305+ .circleci/e2e/test. app-image.sh
306306 - when :
307307 condition :
308308 equal : [ true, << parameters.report >> ]
@@ -315,6 +315,42 @@ jobs:
315315 curl -H "Content-type: application/json" --data @e2e.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
316316 - store_test_results :
317317 path : ./tests/e2e/results
318+ e2e-exe :
319+ executor :
320+ name : win/default
321+ parameters :
322+ report :
323+ description : Send report for test run to slack
324+ type : boolean
325+ default : false
326+ parallelism :
327+ description : Number of threads to run tests
328+ type : integer
329+ default : 1
330+ parallelism : << parameters.parallelism >>
331+ steps :
332+ - checkout
333+ - attach_workspace :
334+ at : .
335+ - run : choco install nodejs --version=15.14.0
336+ - run :
337+ command : |
338+ cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.ts" | circleci tests split) && cd ../..
339+ .circleci/e2e/test.exe.cmd
340+ shell : bash.exe
341+ - when :
342+ condition :
343+ equal : [ true, << parameters.report >> ]
344+ steps :
345+ - run :
346+ name : Send report
347+ when : always
348+ command : |
349+ APP_BUILD_TYPE="Electron (Windows)" node ./.circleci/e2e-results.js
350+ curl -H "Content-type: application/json" --data @e2e.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
351+ shell : bash.exe
352+ - store_test_results :
353+ path : ./tests/e2e/results
318354
319355 e2e-tests :
320356 executor : linux-executor
@@ -756,41 +792,50 @@ jobs:
756792 aws s3 mv s3://${AWS_BUCKET_NAME}/private/${applicationVersion}/ \
757793 s3://${AWS_BUCKET_NAME}/${upgradeLatestFolderPath} --recursive
758794
795+ # invalidate cloudfront cash
796+ aws cloudfront create-invalidation --distribution-id ${AWS_DISTRIBUTION_ID} --paths "/*"
797+
759798 - run :
760799 name : Add tags for all objects and create S3 metrics
761800 command : |
762801
763802 # declare all tags
764803 declare -A tag0=(
765- [key ]='platform '
766- [value ]='macos'
804+ [arch ]='x64 '
805+ [platform ]='macos'
767806 [objectDownload]=${applicationName}'-mac-x64.dmg'
768807 [objectUpgrade]=${applicationName}'-mac-x64.zip'
769808 )
770809
771810 declare -A tag1=(
772- [key ]='platform '
773- [value ]='macos'
811+ [arch ]='arm64 '
812+ [platform ]='macos'
774813 [objectDownload]=${applicationName}'-mac-arm64.dmg'
775814 [objectUpgrade]=${applicationName}'-mac-arm64.zip'
776815 )
777816
778817 declare -A tag2=(
779- [key ]='platform '
780- [value ]='windows'
818+ [arch ]='x64 '
819+ [platform ]='windows'
781820 [objectDownload]=${applicationName}'-win-installer.exe'
782821 )
783822
784823 declare -A tag3=(
785- [key ]='platform '
786- [value ]='linux_AppImage'
787- [objectDownload]=${applicationName}'-x86_64.AppImage'
824+ [arch ]='x64 '
825+ [platform ]='linux_AppImage'
826+ [objectDownload]=${applicationName}'-linux- x86_64.AppImage'
788827 )
789828
790829 declare -A tag4=(
791- [key]='platform'
792- [value]='linux_deb'
793- [objectDownload]=${applicationName}'-amd64.deb'
830+ [arch]='x64'
831+ [platform]='linux_deb'
832+ [objectDownload]=${applicationName}'-linux-amd64.deb'
833+ )
834+
835+ declare -A tag5=(
836+ [arch]='x64'
837+ [platform]='linux_rpm'
838+ [objectDownload]=${applicationName}'-linux-x86_64.rpm'
794839 )
795840
796841 # loop for add all tags to each app and create metrics
@@ -800,32 +845,32 @@ jobs:
800845 designation0="downloads"
801846 designation1="upgrades"
802847
803- id0="${tag[value ]}_${designation0}_${applicationVersion}"
804- id1="${tag[value ]}_${designation1}_${applicationVersion}"
848+ id0="${tag[platform]}_${tag[arch ]}_${designation0}_${applicationVersion}"
849+ id1="${tag[platform]}_${tag[arch ]}_${designation1}_${applicationVersion}"
805850
806851 # add tags to each app for download
807852 aws s3api put-object-tagging \
808853 --bucket ${AWS_BUCKET_NAME} \
809854 --key ${downloadLatestFolderPath}/${tag[objectDownload]} \
810- --tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "'"${tag[key ]}"'", " Value": "'"${tag[value ]}"'"}, { "Key": "designation", "Value": "'"${designation0}"'" }]}'
855+ --tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "platform", "Value": " '"${tag[platform ]}"'"}, {"Key": "arch", " Value": "'"${tag[arch ]}"'"}, { "Key": "designation", "Value": "'"${designation0}"'" }]}'
811856
812857 # add tags to each app for upgrades
813858 aws s3api put-object-tagging \
814859 --bucket ${AWS_BUCKET_NAME} \
815860 --key ${upgradeLatestFolderPath}/${tag[objectUpgrade]:=${tag[objectDownload]}} \
816- --tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "'"${tag[key ]}"'", " Value": "'"${tag[value ]}"'"}, { "Key": "designation", "Value": "'"${designation1}"'" }]}'
861+ --tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "platform", "Value": " '"${tag[platform ]}"'"}, {"Key": "arch", " Value": "'"${tag[arch ]}"'"}, { "Key": "designation", "Value": "'"${designation1}"'" }]}'
817862
818863 # Create metrics for all tags for downloads to S3
819864 aws s3api put-bucket-metrics-configuration \
820865 --bucket ${AWS_BUCKET_NAME} \
821866 --id ${id0} \
822- --metrics-configuration '{"Id": "'"${id0}"'", "Filter": {"And": {"Tags": [{"Key": "'"${tag[key ]}"'", " Value": "'"${tag[value ]}"'"}, {"Key": "designation", "Value": "'"${designation0}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"} ]}}}'
867+ --metrics-configuration '{"Id": "'"${id0}"'", "Filter": {"And": {"Tags": [{"Key": "platform", "Value": " '"${tag[platform ]}"'"}, {"Key": "arch", " Value": "'"${tag[arch ]}"'"}, {"Key": "designation", "Value": "'"${designation0}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"} ]}}}'
823868
824869 # Create metrics for all tags for upgrades to S3
825870 aws s3api put-bucket-metrics-configuration \
826871 --bucket ${AWS_BUCKET_NAME} \
827872 --id ${id1} \
828- --metrics-configuration '{"Id": "'"${id1}"'", "Filter": {"And": {"Tags": [{"Key": "'"${tag[key ]}"'", " Value": "'"${tag[value ]}"'"}, {"Key": "designation", "Value": "'"${designation1}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"}]}}}'
873+ --metrics-configuration '{"Id": "'"${id1}"'", "Filter": {"And": {"Tags": [{"Key": "platform", "Value": " '"${tag[platform ]}"'"}, {"Key": "arch", " Value": "'"${tag[arch ]}"'"}, {"Key": "designation", "Value": "'"${designation1}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"}]}}}'
829874
830875 done
831876
@@ -1064,7 +1109,6 @@ workflows:
10641109 branches :
10651110 only :
10661111 - main
1067- - latest
10681112 jobs :
10691113 # build docker image
10701114 - docker :
@@ -1080,6 +1124,10 @@ workflows:
10801124 name : Build app - Linux (stage)
10811125 requires :
10821126 - Setup build (stage)
1127+ - windows :
1128+ name : Build app - Windows (stage)
1129+ requires :
1130+ - Setup build (stage)
10831131 # integration tests on docker image build
10841132 - integration-tests-run :
10851133 matrix :
@@ -1106,3 +1154,10 @@ workflows:
11061154 report : true
11071155 requires :
11081156 - Build app - Linux (stage)
1157+ # e2e desktop tests on exe build
1158+ - e2e-exe :
1159+ name : E2ETest (exe) - Nightly
1160+ parallelism : 4
1161+ report : true
1162+ requires :
1163+ - Build app - Windows (stage)
0 commit comments