Skip to content

Commit

Permalink
Merge branch 'release/2.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Veblauskas committed Mar 28, 2023
2 parents 8b129ad + 94e80df commit 81df3e0
Show file tree
Hide file tree
Showing 2,084 changed files with 3,005 additions and 2,936 deletions.
85 changes: 63 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
include:
- project: 'tpe/testmo-reporter'
ref: master
file: '/scenarios/testmo-multiple.yml'

- project: 'translations/generator'
ref: master
file: '/jobs/commit-locales.gitlab-ci.yml'

- project: 'translations/generator'
ref: master
file: '/jobs/sync-crowdin.gitlab-ci.yml'

variables:
PUBLIC_REPO_URL: [email protected]:ProtonVPN/win-app.git
SCREENSHOT_PATH: src/bin/TestFailureData/
TEST_REPORT_PATH: results/
PROJECT_ID: "1"
MILESTONE: "Automation"

stages:
- release
Expand All @@ -11,8 +27,11 @@ stages:
- build-installer
- internal-beta
- publish-to-slack
- test-setup
- ui-test
- test-upload
- installation-test
- test-cleanup
- mirror

sign:
Expand Down Expand Up @@ -120,7 +139,7 @@ build-installer-for-release:
only:
- master
- /^release.*$/

prepare-internal-beta-release:
stage: internal-beta
tags:
Expand Down Expand Up @@ -149,43 +168,74 @@ build-installer-for-debug:
- master
- /^release.*$/

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
variables:
SOURCE: "Automation"
NAME: "$CI_JOB_STARTED_AT UTC"
TAGS: "$CI_COMMIT_REF_SLUG"

ui-test:
stage: ui-test
tags:
- ui_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=UI"
- 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
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

connection-tests:
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"
- 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
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-connection"
paths:
- $SCREENSHOT_PATH
expire_in: 2 weeks
- "results/*"
expire_in: 1 weeks

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

win-11-tests:
stage: ui-test
Expand All @@ -196,7 +246,6 @@ win-11-tests:
- 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"
- powershell -File ci\uninstall-app.ps1
except:
- /^debug.*$/
- release/9.9.9
Expand Down Expand Up @@ -224,33 +273,24 @@ mirror:
- git push public master
- git push public "$(git describe --abbrev=0)"

include:
- project: 'translations/generator'
ref: master
file: '/jobs/commit-locales.gitlab-ci.yml'

- project: 'translations/generator'
ref: master
file: '/jobs/sync-crowdin.gitlab-ci.yml'

i18n-sync-crowdin:
when: manual
variables:
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
extends: .i18n-sync-crowdin-common

i18n-manual-sync-crowdin:
when: manual
only:
- branches
variables:
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
extends: .i18n-sync-crowdin-common

i18n-commit-translations:
extends: .i18n-commit-locales-shared
variables:
I18N_COMMIT_CROWDIN_PROJECT: 'windows-vpn'
I18N_COMMIT_CROWDIN_PROJECT: 'windows-vpn'
before_script:
- git config --global core.autocrlf false

Expand All @@ -261,10 +301,11 @@ create-release:
only:
refs:
- develop
- develop-v2
script:
- apt-get update && apt-get install -y python3 python3-pip git
- python3 ci/release.py

send-slack-notification:
tags:
- windows
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

By making a contribution to this project:

1. I assign any and all copyright related to the contribution to Proton Technologies AG;
1. I assign any and all copyright related to the contribution to Proton AG;
2. I certify that the contribution was created in whole by me;
3. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it) is maintained indefinitely and may be redistributed with this project or the open source license(s) involved.
4 changes: 2 additions & 2 deletions ProtonVpn.sln.licenseheader
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extensions: .cs
/*
* Copyright (c) 2020 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand All @@ -20,7 +20,7 @@ extensions: .cs

extensions: .xaml
<!--
Copyright (c) 2020 Proton Technologies AG
Copyright (c) 2023 Proton AG

This file is part of ProtonVPN.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Proton VPN Windows app

Copyright (c) 2022 Proton Technologies AG
Copyright (c) 2023 Proton AG

This repository holds the Proton VPN Windows app.
For a detailed build information see [BUILD](BUILD.md).
Expand Down
2 changes: 1 addition & 1 deletion VisualStudioItemTemplates/CSharp/Code/1033/Class/Class.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
11 changes: 11 additions & 0 deletions ci/TestRun/converter-nunit-junit.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$outputPath = "/results/" + $env:CI_JOB_NAME + "-results.xml"
$folder = Join-Path ($pwd) "/results/"
If(!(test-path -PathType container $folder))
{
New-Item -ItemType Directory -Path $folder
}
$xml = Resolve-Path nunit-results\ProtonVPN.UI.Tests.xml
$output = Join-Path ($pwd) $outputPath
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform;
$xslt.Load(".\ci\TestRun\nunit3-junit.xslt");
$xslt.Transform($xml, $output);
72 changes: 72 additions & 0 deletions ci/TestRun/nunit3-junit.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/test-run">
<testsuites tests="{@testcasecount}" failures="{@failed}" disabled="{@skipped}" time="{@duration}">
<xsl:apply-templates/>
</testsuites>
</xsl:template>

<xsl:template match="test-suite">
<xsl:if test="test-case">
<testsuite tests="{@testcasecount}" time="{@duration}" errors="{@testcasecount - @passed - @skipped - @failed}" failures="{@failed}" skipped="{@skipped}" timestamp="{@start-time}">
<xsl:attribute name="name">
<xsl:for-each select="ancestor-or-self::test-suite[@type='TestSuite']/@name">
<xsl:value-of select="concat(., '.')"/>
</xsl:for-each>
</xsl:attribute>
<xsl:apply-templates select="test-case"/>
</testsuite>
<xsl:apply-templates select="test-suite"/>
</xsl:if>
<xsl:if test="not(test-case)">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>

<xsl:template match="test-case">
<testcase name="{@name}" assertions="{@asserts}" time="{@duration}" status="{@result}" classname="{@classname}">
<xsl:if test="@runstate = 'Skipped' or @runstate = 'Ignored'">
<skipped/>
</xsl:if>

<xsl:apply-templates/>
</testcase>
</xsl:template>

<xsl:template match="command-line"/>
<xsl:template match="settings"/>
<xsl:template match="filter"/>

<xsl:template match="output">
<system-out>
<xsl:value-of select="."/>
</system-out>
</xsl:template>

<xsl:template match="stack-trace">
</xsl:template>

<xsl:template match="test-case/failure">
<failure message="{./message}">
<xsl:value-of select="./stack-trace"/>
</failure>
</xsl:template>

<xsl:template match="test-suite/failure"/>

<xsl:template match="test-case/reason">
<xsl:if test="./message != null">
<skipped message="{./message}"/>
</xsl:if>
</xsl:template>

<xsl:template match="test-case/assertions">
</xsl:template>

<xsl:template match="test-suite/reason"/>

<xsl:template match="properties"/>
</xsl:stylesheet>

6 changes: 6 additions & 0 deletions ci/TestRun/test-run-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<NUnit>
<TestOutputXml>../../nunit-results</TestOutputXml>
</NUnit>
</RunSettings>
4 changes: 2 additions & 2 deletions ci/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def configure_git(git_email, git_username):
os.system(f"git config user.name \"{git_username}\"")

def checkout_develop():
os.system("git fetch origin develop:develop")
os.system("git checkout develop")
os.system("git fetch origin develop-v2:develop-v2")
os.system("git checkout develop-v2")
os.system(f"git remote set-url origin {get_remote_url()}")

def checkout_branch(name):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Proton Technologies AG
* Copyright (c) 2023 Proton AG
*
* This file is part of ProtonVPN.
*
Expand Down
Loading

0 comments on commit 81df3e0

Please sign in to comment.