Skip to content

Commit

Permalink
Merge branch 'release/3.0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Veblauskas committed May 9, 2023
2 parents 81df3e0 + cc0c15c commit 7194fcc
Show file tree
Hide file tree
Showing 826 changed files with 38,717 additions and 21,819 deletions.
49 changes: 35 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -212,52 +212,73 @@ insert_final_newline=false
tab_width=4

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#dotnet_naming_
# dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
# dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
# dotnet_naming_style.private_field_style.capitalization = camel_case
# dotnet_naming_rule.private_fields_are_camel_case.severity = error
# dotnet_naming_rule.private_fields_are_camel_case.symbols = private_field_symbol
# dotnet_naming_rule.private_fields_are_camel_case.style = private_field_style

# Private fields
dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
dotnet_naming_style.private_field_style.capitalization = camel_case
dotnet_naming_style.private_field_style.required_prefix=_
dotnet_naming_rule.private_fields_must_be_prefixed_with__.severity = error
dotnet_naming_rule.private_fields_must_be_prefixed_with__.symbols = private_field_symbol
dotnet_naming_rule.private_fields_must_be_prefixed_with__.style = private_field_style

# Constant fields
dotnet_naming_symbols.constant_field.applicable_kinds = field
dotnet_naming_symbols.constant_field.applicable_accessibilities = *
dotnet_naming_symbols.constant_field.required_modifiers = const
dotnet_naming_style.uppercase.word_separator = _
dotnet_naming_style.uppercase.capitalization = all_upper
dotnet_naming_rule.constant_field_should_be_uppercase.severity = error
dotnet_naming_rule.constant_field_should_be_uppercase.symbols = constant_field
dotnet_naming_rule.constant_field_should_be_uppercase.style = uppercase

# Non private fields
dotnet_naming_symbols.non_private_field_symbol.applicable_kinds=field
dotnet_naming_symbols.non_private_field_symbol.applicable_accessibilities=public,internal,friend,protected,protected_internal,protected_friend
dotnet_naming_style.non_private_field_style.capitalization=pascal_case
dotnet_naming_rule.non_private_fields_are_pascal_case.severity=error
dotnet_naming_rule.non_private_fields_are_pascal_case.symbols=non_private_field_symbol
dotnet_naming_rule.non_private_fields_are_pascal_case.style=non_private_field_style

# Parameters
dotnet_naming_symbols.parameter_symbol.applicable_kinds=parameter
dotnet_naming_style.parameter_style.capitalization=camel_case
dotnet_naming_rule.parameters_are_camel_case.severity=error
dotnet_naming_rule.parameters_are_camel_case.symbols=parameter_symbol
dotnet_naming_rule.parameters_are_camel_case.style=parameter_style

# Classes, struct, enums..
dotnet_naming_symbols.non_interface_type_symbol.applicable_kinds=class,struct,enum,delegate
dotnet_naming_style.non_interface_type_style.capitalization=pascal_case
dotnet_naming_rule.non_interface_types_are_pascal_case.severity=error
dotnet_naming_rule.non_interface_types_are_pascal_case.symbols=non_interface_type_symbol
dotnet_naming_rule.non_interface_types_are_pascal_case.style=non_interface_type_style

# Interfaces
dotnet_naming_symbols.interface_type_symbol.applicable_kinds=interface
dotnet_naming_style.interface_type_style.capitalization=pascal_case
dotnet_naming_style.interface_type_style.required_prefix=I
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity=error
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols=interface_type_symbol
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style=interface_type_style

# Methods, Properties and events
dotnet_naming_symbols.member_symbol.applicable_kinds=method,property,event
dotnet_naming_style.member_style.capitalization=pascal_case
dotnet_naming_rule.members_are_pascal_case.severity=error
dotnet_naming_rule.members_are_pascal_case.symbols=member_symbol
dotnet_naming_rule.members_are_pascal_case.style=member_style

# Constant Fields Should Be PascalCase
dotnet_naming_rule.constant_fields_should_be_upper_case.severity=warning
dotnet_naming_rule.constant_fields_should_be_upper_case.symbols=constant_fields
dotnet_naming_rule.constant_fields_should_be_upper_case.style=upper_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds=field
dotnet_naming_symbols.constant_fields.required_modifiers=const
dotnet_naming_style.pascal_case_style.capitalization=pascal_case
# Async Methods
dotnet_naming_symbols.async_method.applicable_kinds = method
dotnet_naming_symbols.async_method.applicable_accessibilities = *
dotnet_naming_symbols.async_method.required_modifiers = async
dotnet_naming_style.ends_with_async.required_prefix =
dotnet_naming_style.ends_with_async.required_suffix = Async
dotnet_naming_style.ends_with_async.word_separator =
dotnet_naming_style.ends_with_async.capitalization = pascal_case
dotnet_naming_rule.async_method_should_be_ends_with_async.severity = suggestion
dotnet_naming_rule.async_method_should_be_ends_with_async.symbols = async_method
dotnet_naming_rule.async_method_should_be_ends_with_async.style = ends_with_async

# ReSharper inspection severities
resharper_arrange_this_qualifier_highlighting=hint
Expand Down
155 changes: 73 additions & 82 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ variables:
PUBLIC_REPO_URL: [email protected]:ProtonVPN/win-app.git
SCREENSHOT_PATH: src/bin/TestFailureData/
TEST_REPORT_PATH: results/
PROJECT_ID: "1"
MILESTONE: "Automation"
PROJECT_ID: "13"
MILESTONE: "Windows"
FF_USE_FASTZIP: "true"
TRANSFER_METER_FREQUENCY: "2s"
ARTIFACT_COMPRESSION_LEVEL: "fastest"
CACHE_COMPRESSION_LEVEL: "fastest"

stages:
- release
- bot # comes from translations/generator job
- build
- test
- sign
- build-installer
- internal-beta
- publish-to-slack
Expand All @@ -34,42 +37,27 @@ stages:
- test-cleanup
- mirror

sign:
stage: sign
tags:
- windows
script:
- echo "Signing files..."
- python ci\main.py sign
artifacts:
expire_in: 1 day
paths:
- src/bin/
only:
- master
- /^release.*$/
- develop

build-release:
stage: build
tags:
- windows
- windows-dot-net
script:
- echo "Restoring NuGet Packages..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "src\\ProtonVPN.MarkupValidator\\ProtonVPN.MarkupValidator.csproj"
- echo "Building native dependencies..."
- 'c:\nuget\nuget.exe restore ProtonVPN.InstallActions.sln'
- cmd.exe /c BuildDependencies.bat
- dotnet publish src\ProtonVPN.MarkupValidator\ProtonVPN.MarkupValidator.csproj --arch x64 -c Release --no-self-contained -o src\bin
- echo "Downloading translations from crowdin..."
- python ci\main.py lint-languages
- python ci\main.py add-commit-hash $env:CI_COMMIT_SHORT_SHA
- python ci\main.py defaultConfig
- echo "Building release..."
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "ProtonVpn.sln"
- echo "Publishing release..."
- dotnet publish ProtonVpn.sln --arch x64 -c Release --no-self-contained --verbosity q -o src\bin
- msbuild src\ProtonVPN.NativeHost\NativeHost.vcxproj /p:Configuration=Release /p:Platform=x64
artifacts:
expire_in: 1 day
paths:
- src/bin/
- src/bin
- src/ProtonVPN.NativeHost/bin
only:
- master
- /^release.*$/
Expand All @@ -79,24 +67,24 @@ build-release:
build-debug:
stage: build
tags:
- windows
- windows-dot-net
script:
- echo "Restoring NuGet Packages..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "src\\ProtonVPN.MarkupValidator\\ProtonVPN.MarkupValidator.csproj"
- echo "Building native dependencies..."
- 'c:\nuget\nuget.exe restore ProtonVPN.InstallActions.sln'
- cmd.exe /c BuildDependencies.bat
- dotnet publish src\ProtonVPN.MarkupValidator\ProtonVPN.MarkupValidator.csproj --arch x64 -c Release --no-self-contained -o src\bin
- echo "Downloading translations from crowdin..."
- python ci\main.py lint-languages
- python ci\main.py add-commit-hash $env:CI_COMMIT_SHORT_SHA
- python ci\main.py defaultConfig
- echo "Building debug..."
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Debug /verbosity:quiet "ProtonVpn.sln"
- echo "Publishing debug..."
- dotnet publish ProtonVpn.sln --arch x64 -c Debug --no-self-contained --verbosity q -o src\bin
- msbuild src\ProtonVPN.NativeHost\NativeHost.vcxproj /p:Configuration=Release /p:Platform=x64
artifacts:
expire_in: 1 day
paths:
- src/bin/
- src/bin
- src/ProtonVPN.NativeHost/bin
except:
- master
- /^release.*$/
Expand All @@ -106,12 +94,11 @@ build-debug:
tests:
stage: test
tags:
- windows
- windows-dot-net
script:
- echo "Running tests..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Debug /verbosity:quiet "ProtonVpn.sln"
- coverlet src\bin --target "vstest.console.exe" --targetargs "src/bin/ProtonVPN*Tests*.dll /TestCaseFilter:TestCategory!=UI&TestCategory!=Connection /Platform:x64" --format cobertura --output .\coverage-reports --exclude "[*.Tests*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[TapInstaller]*" --exclude "[*.Installers]*"
- dotnet restore ProtonVpn.sln
- dotnet build ProtonVpn.sln
- coverlet src\bin --target "dotnet" --targetargs "test ProtonVpn.sln -l ""console;verbosity=normal"" --filter ""TestCategory!=UI&TestCategory!=Connection"" --no-restore --no-build" --format cobertura --output .\coverage-reports --exclude "[*.Tests*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[*.Installers]*"
- powershell -Command "(gc coverage-reports.cobertura.xml) -replace '\\', '/' | Out-File -encoding UTF8 cobertura.xml"
- ReportGenerator.exe "-reports:cobertura.xml" "-targetdir:.\code-coverage-report-html"
artifacts:
Expand All @@ -126,15 +113,11 @@ build-installer-for-release:
tags:
- windows
script:
- python ci\main.py tap-installer
- python ci\main.py tun-installer
- python ci\main.py update-gh-list
- python ci\main.py app-installer $env:CI_COMMIT_SHORT_SHA
artifacts:
paths:
- Setup/ProtonVPN-SetupFiles/
- Setup/ProtonVPNTun-SetupFiles/
- Setup/ProtonVPNTap-SetupFiles/
- Setup/Installers/
expire_in: 4 weeks
only:
- master
Expand All @@ -143,7 +126,7 @@ build-installer-for-release:
prepare-internal-beta-release:
stage: internal-beta
tags:
- windows
- windows-dot-net
when: manual
script:
- python -m pip install -r ci\python-libs.txt
Expand All @@ -156,13 +139,11 @@ build-installer-for-debug:
tags:
- windows
script:
- python ci\main.py tap-installer
- python ci\main.py tun-installer
- python ci\main.py update-gh-list
- python ci\main.py app-installer $env:CI_COMMIT_SHORT_SHA
artifacts:
paths:
- Setup/ProtonVPN-SetupFiles/
- Setup/Installers/
expire_in: 4 weeks
except:
- master
Expand All @@ -171,90 +152,100 @@ build-installer-for-debug:
testmo-setup:
allow_failure: true
stage: test-setup
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_REF_NAME == "release/9.9.9" || $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ "/debug/"
when: never
- if: $CI_COMMIT_REF_NAME =~ "/release/"
variables:
SOURCE: "Release"
- when: always
except:
- /^debug.*$/
- release/9.9.9
- master
variables:
SOURCE: "Automation"
SOURCE: "Windows"
NAME: "$CI_JOB_STARTED_AT UTC"
TAGS: "$CI_COMMIT_REF_SLUG"

ui-test:
stage: ui-test
tags:
- ui_tests
- ino-setup
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=UI" /Settings:ci/TestRun/test-run-settings.xml
- powershell -File ci\uninstall-app.ps1
- ci\uninstall-app.ps1
- ci\install-the-app.ps1
- dotnet build src/Tests/ProtonVPN.UI.Tests/ProtonVPN.UI.Tests.csproj --arch x64 -o src/bin
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /Settings:ci/TestRun/test-run-settings.xml /TestCaseFilter:"Category=UI"
- ci\uninstall-app.ps1
after_script:
- powershell.exe ./ci/TestRun/converter-nunit-junit.ps1
except:
- /^debug.*$/
- release/9.9.9
- master
- feature/inno-setup-net6
artifacts:
when: always
name: "result-ui"
paths:
- $SCREENSHOT_PATH
- "results/*"
expire_in: 1 weeks

connection-tests:
connection-test:
stage: ui-test
tags:
- connection_tests
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=Connection" /Settings:ci/TestRun/test-run-settings.xml
- powershell -File ci\uninstall-app.ps1
- ci\uninstall-app.ps1
- ci\install-the-app.ps1
- dotnet build src/Tests/ProtonVPN.UI.Tests/ProtonVPN.UI.Tests.csproj --arch x64 -o src/bin
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /Settings:ci/TestRun/test-run-settings.xml /TestCaseFilter:"Category=Connection"
- ci\uninstall-app.ps1
after_script:
- powershell.exe ./ci/TestRun/converter-nunit-junit.ps1
except:
- /^debug.*$/
- release/9.9.9
- master
- feature/inno-setup-net6
artifacts:
when: always
name: "result-connection"
name: "result-ui"
paths:
- $SCREENSHOT_PATH
- "results/*"
expire_in: 1 weeks

testmo-upload:
allow_failure: true
stage: test-upload
variables:
RESULT_FOLDER: "results/*.xml"

win-11-tests:
win-11-test:
stage: ui-test
when: manual
tags:
- win11
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=Smoke"
- ci\uninstall-app.ps1
- ci\install-the-app.ps1
- dotnet build src/Tests/ProtonVPN.UI.Tests/ProtonVPN.UI.Tests.csproj --arch x64 -o src/bin
- dotnet publish src\Tests\TestTools.ProfileCleaner\TestTools.ProfileCleaner.csproj --arch x64 -c Release --self-contained --verbosity q -o src\bin
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /Settings:ci/TestRun/test-run-settings.xml /TestCaseFilter:"Category=Smoke"
- ci\uninstall-app.ps1
after_script:
- powershell.exe ./ci/TestRun/converter-nunit-junit.ps1
except:
- /^debug.*$/
- release/9.9.9
- master
artifacts:
when: on_failure
when: always
name: "result-ui"
paths:
- $SCREENSHOT_PATH
expire_in: 2 weeks
- "results/*"
expire_in: 1 weeks

testmo-upload:
allow_failure: true
stage: test-upload
except:
- /^debug.*$/
- release/9.9.9
- master
variables:
RESULT_FOLDER: "results/*.xml"

mirror:
stage: mirror
Expand Down
Loading

0 comments on commit 7194fcc

Please sign in to comment.