ci(GODT-2717): Create a job that will run on schedule

This commit is contained in:
Gjorgji Slamkov 2023-08-10 12:19:59 +00:00
parent ccb9b7f81c
commit c90248920a
4 changed files with 43 additions and 0 deletions

View File

@ -47,6 +47,16 @@ stages:
allow_failure: true
- when: never
.rules-branch-manual-scheduled-and-test-branch-always:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH =~ /(test\/)/
when: always
allow_failure: false
- if: $CI_COMMIT_BRANCH
when: manual
allow_failure: true
- when: never
# ENV
.env-windows:
before_script:
@ -172,6 +182,13 @@ test-integration-race:
script:
- make test-integration-race
test-integration-nightly:
extends:
- test-integration
- .rules-branch-manual-scheduled-and-test-branch-always
script:
- make test-integration-nightly
test-windows:
extends:
- .env-windows

View File

@ -258,6 +258,15 @@ test-integration-debug: gofiles
test-integration-race: gofiles
go test -v -timeout=60m -p=1 -count=1 -race -failfast github.com/ProtonMail/proton-bridge/v3/tests
test-integration-nightly: gofiles
mkdir -p coverage/integration
go test \
-v -timeout=90m -p=1 -count=1 \
${GOCOVERAGE} \
github.com/ProtonMail/proton-bridge/v3/tests \
${GOCOVERDIR}/integration \
nightly
fuzz: gofiles
go test -fuzz=FuzzUnmarshal -parallel=4 -fuzztime=60s $(PWD)/internal/legacy/credentials
go test -fuzz=FuzzNewParser -parallel=4 -fuzztime=60s $(PWD)/pkg/message/parser

View File

@ -267,6 +267,7 @@ func TestFeatures(testingT *testing.T) {
Format: "pretty",
Paths: getFeaturePaths(),
TestingT: testingT,
Tags: getFeatureTags(),
},
}
@ -286,3 +287,18 @@ func getFeaturePaths() []string {
return paths
}
func getFeatureTags() string {
var tags string
switch arguments := os.Args; arguments[len(arguments)-1] {
case "nightly":
tags = ""
case "smoke": // Currently this is just a placeholder, as there are no scenarios tagged with @smoke
tags = "@smoke"
default:
tags = "~@regression && ~@smoke" // To exclude more add `&& ~@tag`
}
return tags
}

View File

@ -1,3 +1,4 @@
@regression
Feature: Bridge can fully synchronize an account with high number of messages, and correct number of messages is shown in client
Background:
Given there exists an account with username "[user:user]" and password "password"