Skip to content

Commit

Permalink
SG-20889 Remove dead code related to UI tests on Azure (#52)
Browse files Browse the repository at this point in the history
* Remove dead code related to UI tests on Azure

* Remove test file
  • Loading branch information
carlos-villavicencio-adsk authored Jun 13, 2024
1 parent 78ba8a7 commit 13e3a07
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 88 deletions.
10 changes: 0 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ variables:
jobs:
- template: build-pipeline.yml
parameters:
# This has the side effect that it ensures we can clone the UI automation
# repo with the SSH key
has_ui_tests: true
# This will ensure we can clone other repositories on a branch
# or directly on master.
additional_repositories:
Expand All @@ -43,13 +40,6 @@ jobs:
# This one shouldn't get cloned.
- name: tk-ci-tools
post_tests_steps:
# Ensures the automation library get cloned only on Windows.
# Our tests are written in a way that they are skipped if the automation
# framework is missing, so it's important that has_ui_tests triggers a clone
# only for builds we can run automation for.
- bash: |
python tests/test_ui_automation.py
displayName: Testing import of UI automation framework.
- bash: |
python tests/test_repo_release_cloning.py
env:
Expand Down
16 changes: 2 additions & 14 deletions build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ parameters:
type: string
default: master
# Allows to skip test execution.
# This parameter is deprecated. Please use has_unit_tests and has_ui_tests.
# This parameter is deprecated. Please use has_unit_tests.
- name: skip_tests
type: boolean
default: false
# Tells the build pipeline that the repository has unit tests to execute
- name: has_unit_tests
type: boolean
default: true
# Tells the build pipeline that there are ui automation tests to execute
- name: has_ui_tests
type: boolean
default: false
# Post test steps
# This is a list of Azure Pipeline steps that will be inserted
# right after the tests were run.
Expand All @@ -62,12 +58,6 @@ parameters:
- name: release_repo_ref
type: string
default: master
# MPAS-MA repo ref value to be installed.
# We're using a github.com private sync with the latest working value in order to
# install that MA module version.
- name: ui_automation_ref
type: string
default: d621a86d52eb9d45704393a9d5cc02b30e836a8e
# Tells the build pipeline that there are resources to validate
- name: has_ui_resources
type: boolean
Expand Down Expand Up @@ -96,7 +86,7 @@ jobs:
# Note: once we've removed skip_tests from existing pipelines, we can remove the
# the first if.
- ${{ if eq(parameters.skip_tests, false) }}:
- ${{ if or(parameters.has_unit_tests, parameters.has_ui_tests) }}:
- ${{ if eq(parameters.has_unit_tests, true) }}:
- template: "internal/run-tests.yml"
parameters:
# pass through all parameters
Expand All @@ -106,8 +96,6 @@ jobs:
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
has_ui_tests: ${{ parameters.has_ui_tests }}
ui_automation_ref: ${{ parameters.ui_automation_ref }}

# If the build was launched because a tag was created, we'll want to deploy
# this to the AppStore.
Expand Down
23 changes: 0 additions & 23 deletions internal/run-tests-with.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,9 @@ parameters:
# - bash: do_something
# - bash: do_something_else
post_tests_steps: []
# When set to true, the ui automation tools are cloned on the build agent.
# Note that the ui automation tools can only be cloned on repositories that
# are in the shotgunsoftware organization due to the need to private
# repo access.
has_ui_tests: false
# When set to true, the agents for all platforms are set so tests can be executed
# on all platforms.
has_unit_tests: true
# MPAS-MA repo ref value to be installed.
ui_automation_ref: ""

jobs:
- job:
Expand Down Expand Up @@ -114,22 +107,6 @@ jobs:
# in theory have a project named Toolkit and run these commands. In practice however,
# all tests tasks require access to our secrets so they can't be used and the build will
# fail.
- ${{ if and(eq(parameters.has_ui_tests, true), eq( variables['System.TeamProject'], 'Toolkit' )) }}:
- template: install-ssh-key.yml
- bash: |
ssh-keyscan github.com > ~/.ssh/known_hosts
git clone --depth 1 --single-branch [email protected]:$UI_AUTOMATION_REPO ../ui_automation
displayName: Cloning UI automation tools
env:
# repo.ui_automation can be found on Azure Pipelines Library
UI_AUTOMATION_REPO: $(repo.ui_automation)
- bash: |
git checkout ${{ parameters.ui_automation_ref }}
pip install .
pip install --force-reinstall comtypes==1.1.14
displayName: PIP install UI automation tools and comtypes 1.1.14
workingDirectory: ../ui_automation

# Run the tests. The task will create a simple coverage file if one is missing.
# It will include all code except for the "tests" folder.
Expand Down
11 changes: 0 additions & 11 deletions internal/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ parameters:
post_tests_steps: []
# If set to true, the build agent will run unit tests.
has_unit_tests: true
# If set to true, the build agent will install the necessary libraries to run ui tests.
# Note: Our ui tests currently only targeted Windows which means we ran our automation only
# on Windows. For now they're disabled.
# In order to re-enable them, just pass the has_ui_tests parameter.
has_ui_tests: false
# MPAS-MA repo ref value to be installed.
ui_automation_ref: ""

# TODO: At some point, we should review how these environments are enumerated.
# Something like:
Expand Down Expand Up @@ -107,7 +100,6 @@ jobs:
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
ui_automation_ref: ${{ parameters.ui_automation_ref }}

# ------------------------
- template: run-tests-with.yml
Expand All @@ -122,7 +114,6 @@ jobs:
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
ui_automation_ref: ${{ parameters.ui_automation_ref }}

- template: run-tests-with.yml
parameters:
Expand Down Expand Up @@ -163,7 +154,6 @@ jobs:
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
ui_automation_ref: ${{ parameters.ui_automation_ref }}

- template: run-tests-with.yml
parameters:
Expand Down Expand Up @@ -205,7 +195,6 @@ jobs:
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
ui_automation_ref: ${{ parameters.ui_automation_ref }}

- template: run-tests-with.yml
parameters:
Expand Down
30 changes: 0 additions & 30 deletions tests/test_ui_automation.py

This file was deleted.

0 comments on commit 13e3a07

Please sign in to comment.