Files
proton-bridge/ci/test.yml
2025-12-15 12:48:48 +01:00

179 lines
3.7 KiB
YAML

---
lint:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-br-tag-and-MR-and-devel-always
script:
- make lint
tags:
- shared-medium
lint-bug-report-preview:
stage: test
extends:
- .image-linux-test
- .rules-branch-and-MR-manual
script:
- make lint-bug-report-preview
tags:
- shared-medium
.script-test:
stage: test
extends:
- .rules-branch-manual-MR-and-devel-always
script:
- which go && go version
- which gcc && gcc --version
- make test
artifacts:
paths:
- coverage/**
test-linux:
extends:
- .image-linux-test
- .script-test
tags:
- shared-large
test-windows:
extends:
- .env-windows
- .script-test
test-darwin:
extends:
- .env-darwin
- .script-test
fuzz-linux:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-MR-and-devel-always
script:
- make fuzz
tags:
- shared-large
test-linux-race:
extends:
- test-linux
- .rules-branch-and-MR-manual
script:
- make test-race
test-integration:
extends:
- test-linux
script:
- make test-integration | tee -a integration-job.log
after_script:
- |
grep "Error: " integration-job.log
artifacts:
when: always
paths:
- integration-job.log
test-integration-race:
extends:
- test-integration
- .rules-branch-and-MR-manual
script:
- make test-integration-race | tee -a integration-race-job.log
artifacts:
when: always
paths:
- integration-race-job.log
test-integration-nightly:
extends:
- test-integration
- .rules-branch-manual-scheduled-and-test-branch-always
needs:
- test-integration
script:
- make test-integration-nightly | tee -a nightly-job.log
after_script:
- |
grep "Error: " nightly-job.log
artifacts:
when: always
paths:
- tests/result/feature-tests.xml
- nightly-job.log
test-coverage:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-scheduled-and-test-branch-always
script:
- ./utils/coverage.sh
coverage: '/total:.*\(statements\).*\d+\.\d+%/'
needs:
- test-linux
- test-windows
- test-darwin
- test-integration
- test-integration-nightly
tags:
- shared-small
artifacts:
paths:
- coverage*
- coverage/**
when: "always"
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
test-e2e-ui:
stage: test
extends:
- .rules-branch-manual-scheduled-and-test-branch-always
tags:
- inbox-hyperv-windows-v1
image: windows-2022-inbox-gui-1.0.0
variables:
REQUIRES_GRAPHICAL_CONSOLE: true
before_script:
- echo "Downloading dotnet dependencies"
- cd ./tests/e2e/ui_tests/windows_os/
- dotnet restore ./ProtonMailBridge.UI.Tests.csproj
- dotnet list package
script:
- |
pwsh "$Env:CI_PROJECT_DIR/tests/e2e/ui_tests/windows_os/InstallerScripts/Get-BridgeInstaller.ps1"
- |
$Env:no_grpc_proxy="127.0.0.1"
$no_grpc_proxy="127.0.0.1"
dotnet test ./ProtonMailBridge.UI.Tests.csproj -- NUnit.Where="cat != TemporarilyExcluded"
after_script:
- |
cp "C:\Users\gitlab-runner\AppData\Roaming\protonmail\bridge-v3\logs\*" "$Env:CI_PROJECT_DIR\tests\e2e\ui_tests\windows_os\Results\artifacts\Logs\"
- |
pwsh "$Env:CI_PROJECT_DIR\tests\e2e\ui_tests\windows_os\InstallerScripts\Remove-Bridge.ps1"
artifacts:
paths:
- tests/e2e/ui_tests/windows_os/Results/artifacts/*
when: always
go-vuln-check:
extends:
- .image-linux-test
- .rules-branch-manual-MR-and-devel-always
stage: test
tags:
- shared-medium
script:
- ./utils/govulncheck.sh
artifacts:
when: always
paths:
- vulns*