Skip to content

Commit 9a71ae5

Browse files
authored
add tc, fix key, fix gha flow (#920)
1 parent 200b8c2 commit 9a71ae5

File tree

6 files changed

+143
-19
lines changed

6 files changed

+143
-19
lines changed

.github/workflows/check-beta-functional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check new beta version - Functional
22

33
on:
44
schedule:
5-
- cron: "55 1/5 * * *"
5+
- cron: "55 1/5 1 * *"
66
env:
77
LATEST: ""
88
permissions:

.github/workflows/main.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,22 @@ jobs:
5757
- name: Set Environment (Manual)
5858
if: ${{ inputs.win_installer_link }}
5959
run: |
60-
echo "MANUAL=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
60+
echo "MANUAL=true" | Out-File -FilePath .env -Encoding utf8 -Append -Force
6161
Write-Host "Running smoke tests on supplied executable"
6262
- name: Set Environment (Scheduled Beta)
6363
if: ${{ inputs.job_to_run == 'Test-Windows' && inputs.is_pull_request == false}}
6464
run: |
65-
echo "TESTRAIL_REPORT=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
65+
echo "TESTRAIL_REPORT=true" | Out-File -FilePath .env -Encoding utf8 -Append -Force
6666
Write-Host "Running report for most recent Beta on Windows"
67-
Write-Host "$env:TESTRAIL_REPORT"
6867
- name: Select Test Set
6968
if: ${{ inputs.test_set != null }}
7069
run: |
71-
echo "STARFOX_MANIFEST=.\manifests\${{ inputs.test_set }}.yaml" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
72-
Write-Host "$env:TESTRAIL_REPORT"
70+
echo "STARFOX_MANIFEST=.\manifests\${{ inputs.test_set }}.yaml" | Out-File -FilePath .env -Encoding utf8 -Append -Force
7371
shell: pwsh
7472
- name: Set Functional Split
7573
if: ${{ inputs.test_set == 'functional' }}
7674
run: |
77-
$env_contents = @"
78-
TESTRAIL_FUNCTIONAL_SPLIT=1
79-
"@
80-
New-Item -Name .env -Value $env_contents -ItemType File -Force
81-
Write-Host "$env:TESTRAIL_REPORT"
82-
Write-Host "$env:STARFOX_MANIFEST"
75+
echo "TESTRAIL_FUNCTIONAL_SPLIT=1" | Out-File -FilePath .env -Encoding utf8 -Append -Force
8376
- name: Install dependencies
8477
run: |
8578
mkdir -p artifacts;
@@ -107,10 +100,7 @@ jobs:
107100
- name: Download Executable
108101
if: ${{ inputs.win_installer_link }}
109102
run: |
110-
$env_contents = @"
111-
STARFOX_MANIFEST='.\manifests\incident.yaml'
112-
"@
113-
New-Item -Name .env -Value $env_contents -ItemType File -Force
103+
echo "STARFOX_MANIFEST='.\manifests\incident.yaml'" | Out-File -FilePath .env -Encoding utf8 -Append -Force
114104
Invoke-WebRequest -Uri ${{ inputs.win_installer_link }} -OutFile "${{ github.workspace }}\setup.exe"
115105
New-Item -ItemType Directory -Path "C:\Program Files\Custom Firefox" -Force
116106
shell: pwsh
@@ -181,15 +171,15 @@ jobs:
181171
echo "Running report for most recent Beta on MacOS";
182172
- name: Select Test Set
183173
if: ${{ inputs.test_set != null }}
184-
run: echo "STARFOX_MANIFEST=./manifests/${{ inputs.test_set }}.yaml" >> "$GITHUB_ENV"
174+
run: echo "STARFOX_MANIFEST=./manifests/${{ inputs.test_set }}.yaml" >> .env
185175
- name: Set Functional Split
186176
if: ${{ inputs.test_set == 'functional' }}
187-
run: echo "TESTRAIL_FUNCTIONAL_SPLIT=1" >> "$GITHUB_ENV"
177+
run: echo "TESTRAIL_FUNCTIONAL_SPLIT=1" >> .env
188178
- name: Set Environment (Manual)
189179
if: ${{ inputs.mac_installer_link }}
190180
run: |
191181
echo "MANUAL='true'" >> "$GITHUB_ENV";
192-
echo "STARFOX_MANIFEST=manifests/incident.yaml" >> "$GITHUB_ENV"
182+
echo "STARFOX_MANIFEST=manifests/incident.yaml" >> .env
193183
echo "Running smoke tests on supplied executable";
194184
- name: Install dependencies
195185
run: |

choose_ci_set.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ def is_addable(test_name, result):
116116
test_name = test_name.replace(".py", "")
117117
if "::" in test_name:
118118
test, subtest = test_name.split("::")
119+
if test not in pointer:
120+
raise ValueError(f"{test} not in key.yaml")
119121
pointer = pointer[test]
120122
pointer = pointer[subtest]
121123
else:
124+
if test_name not in pointer:
125+
raise ValueError(f"{test_name} not in key.yaml")
122126
pointer = pointer[test_name]
123127

124128
if pointer == "pass":

manifests/key.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ address_bar_and_search:
88
test_addon_suggestion: unstable
99
test_addressbar_search_engine_keywords: pass
1010
test_copied_url_contains_https: pass
11+
test_ctrl_enter_completes_link_and_can_refresh: pass
1112
test_ctrl_enter_fixes_url: pass
1213
test_default_search_provider_change_awesome_bar: unstable
1314
test_default_search_provider_change_legacy_search_bar: deprecated
15+
test_disable_websearch_from_awesome_bar: pass
1416
test_dont_show_search_suggestions_in_private_window: pass
1517
test_google_search_counts_us:
1618
linux: pass
@@ -20,13 +22,15 @@ address_bar_and_search:
2022
test_insertion_point_no_search_terms_display: pass
2123
test_no_suggestions_for_empty_query: pass
2224
test_non_sponsored_topsite_context_menu_option: pass
25+
test_paste_and_go_opens_correct_url: pass
2326
test_refresh_firefox_dialog: pass
2427
test_sap_google_adclick: unstable
2528
test_seach_suggestions_can_be_disabled: pass
2629
test_search_code_google_non_us: pass
2730
test_search_code_google_us: pass
2831
test_search_engine_selector: pass
2932
test_search_mode_appears_after_input: pass
33+
test_search_mode_exits_correctly: pass
3034
test_search_mode_persists_mixed_with_bing: pass
3135
test_search_modes_for_sites: unstable
3236
test_search_string_displayed_when_addressbar_unfocused: pass
@@ -36,10 +40,13 @@ address_bar_and_search:
3640
test_searchbar_on_engines_remove_restore: pass
3741
test_searchbar_results_shown_in_a_new_tab: pass
3842
test_searchmode_change_tab: pass
43+
test_searchmode_cleared_on_engine_removal: pass
3944
test_server_not_found_error: pass
4045
test_server_not_found_error_pb: pass
4146
test_suggestion_engine_selection: pass
4247
test_tile_menu_options: pass
48+
test_use_different_search_shortcut_while_already_in_search_mode: pass
49+
test_verify_url_after_tab_switch_with_search_mode: pass
4350
audio_video:
4451
test_allow_audio_video_functionality:
4552
linux: unstable

taskcluster/fx_desktop_qa_automation_taskgraph/target_tasks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ def filter(task, parameters):
1010

1111
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
1212

13+
@register_target_task("new_beta_func")
14+
def target_tasks_beta_func(full_task_graph, parameters, graph_config):
15+
"""Select the set of tasks required for a Beta Functional + Reporting session."""
16+
17+
def filter(task, parameters):
18+
return task.attributes.get("beta-func", False)
19+
20+
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
21+
1322
@register_target_task("new_devedition_qa")
1423
def target_tasks_devedition_qa(full_task_graph, parameters, graph_config):
1524
"""Select the set of tasks required for a DevEdition Smoke + Reporting session."""
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
transforms:
2+
- fx_desktop_qa_automation_taskgraph.transforms.new_beta_qa:transforms
3+
- taskgraph.transforms.notify:transforms
4+
5+
task-defaults:
6+
label: "Test New Beta Version - Functional"
7+
description: "Checks for new betas, runs functional tests, reports to TestRail and Slack"
8+
worker-type: t-linux-wayland
9+
worker:
10+
taskcluster-proxy: true
11+
max-run-time: 3600
12+
artifacts:
13+
- name: public/results
14+
path: checkouts/vcs/artifacts
15+
type: directory
16+
env:
17+
TESTRAIL_REPORT: "true"
18+
STARFOX_MANIFEST: "./manifests/functional.yaml"
19+
TESTRAIL_FUNCTIONAL_SPLIT: 1
20+
routes:
21+
- notify.slack-channel.C07AHPJ525V.on-resolved
22+
scopes:
23+
- secrets:get:project/mozilla/fx-desktop-qa-automation/level-3/*
24+
- queue:route:notify.slack-channel.C07AHPJ525V # notify mobile-alerts-sandbox on failure
25+
- notify:slack-channel:C07AHPJ525V
26+
27+
tasks:
28+
linux:
29+
attributes:
30+
beta-func: true
31+
run-on-tasks-for: []
32+
run:
33+
using: run-task
34+
cwd: "{checkout}"
35+
command: |-
36+
export PATH=$HOME/.local/bin:$PWD:$PATH
37+
mkdir -p artifacts;
38+
pip3 install 'pipenv==2023.11.15';
39+
pip3 install 'ruff>=0.4.8,<0.5';
40+
mv ./ci_pyproject.toml ./pyproject.toml;
41+
pipenv install;
42+
export FX_CHANNEL="beta";
43+
./collect_executables.sh;
44+
export FX_EXECUTABLE=./firefox/firefox;
45+
pipenv run python -c 'from modules import testrail_integration as tri; tri.tc_reportable()' || exit 0;
46+
$FX_EXECUTABLE --version;
47+
. ./keyring-unlock.sh
48+
pipenv run python choose_ci_set.py;
49+
pipenv run pytest --fx-executable $FX_EXECUTABLE $(cat selected_tests);
50+
export FAILURE=${?};
51+
mv ./ci_pyproject_headed.toml ./pyproject.toml;
52+
export REPORTABLE=1;
53+
pipenv run pytest --fx-executable $FX_EXECUTABLE $(cat selected_tests);
54+
exit $((${?} | ${FAILURE}))
55+
notify:
56+
recipients:
57+
- type: slack-channel
58+
channel-id: C07AHPJ525V
59+
status-type: on-defined
60+
content:
61+
slack:
62+
blocks: [
63+
{
64+
"type": "header",
65+
"text": {
66+
"type": "plain_text",
67+
"text": "firefox-desktop :firefox: ${task.metadata.name} Linux\n "
68+
}
69+
},
70+
{
71+
"type": "divider"
72+
},
73+
{
74+
"type": "section",
75+
"text": {
76+
"type": "mrkdwn",
77+
"text": "*Task*: <https://firefox-ci-tc.services.mozilla.com/tasks/${status.taskId}|Taskcluster>"
78+
}
79+
},
80+
{
81+
"type": "section",
82+
"text": {
83+
"type": "mrkdwn",
84+
"text": "*Owner*: ${task.metadata.owner}"
85+
}
86+
},
87+
{
88+
"type": "section",
89+
"text": {
90+
"type": "mrkdwn",
91+
"text": "*Commit*: <${task.metadata.source}>"
92+
}
93+
},
94+
{
95+
"type": "section",
96+
"text": {
97+
"type": "mrkdwn",
98+
"text": "*Test Summary*: <https://firefoxci.taskcluster-artifacts.net/${status.taskId}/0/public/results/report.html?sort=result> :debug:"
99+
}
100+
},
101+
{
102+
"type": "divider"
103+
},
104+
{
105+
"type": "context",
106+
"elements": [
107+
{
108+
"type": "mrkdwn",
109+
"text": ":testops-notify: created by Desktop QA Test Engineering"
110+
}
111+
]
112+
}
113+
]
114+
text: "Cron {task[name]} with id $taskId has finished!"

0 commit comments

Comments
 (0)