Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only trigger presubmit for 'on_device' and 'runtest' labels #371

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3f695bd
Cleanup unused headers in evergreen_info. (#313)
y4vor Mar 25, 2023
ecd28fd
sideboard's first commit (#225)
sideb0ard Apr 3, 2023
6e374b9
Fix webdriver links. (#315)
jellefoks Apr 4, 2023
b6fa5ec
nyardi: commit one (#319)
niranjanyardi Apr 5, 2023
f4f525d
A change is in the air... (#321)
gbournou Apr 6, 2023
ca2183d
[media] Refine comment of media.h (#320)
xiaomings Apr 6, 2023
be59533
yijiazhang's first commit (#331)
yjzhang111 Apr 11, 2023
3d89c68
Add workflow step that creates a unit test report (#335)
oxve Apr 13, 2023
7112a8f
Create workflow_trigger.yaml
isarkis Apr 14, 2023
658b247
Update workflow_trigger.yaml
isarkis Apr 14, 2023
c41c32a
Tune GitHub workflow concurrency (#343)
isarkis Apr 15, 2023
00b4697
Update evergreen.yaml
isarkis Apr 17, 2023
50df07a
Update raspi-2.yaml
isarkis Apr 17, 2023
8ab4362
Fix Python 3.11.2 installer bug in Docker Windows
isarkis Apr 18, 2023
30b354d
Test Copybara (#345)
andrewsavage1 Apr 18, 2023
ae30871
Test Copybara (#347)
andrewsavage1 Apr 18, 2023
740d5ab
Test Copybara double workflow (#348)
andrewsavage1 Apr 18, 2023
af6aa43
Test copybara references (#349)
andrewsavage1 Apr 18, 2023
9c2a79a
Concurrency fix for forked PRs. (#358)
isarkis Apr 19, 2023
7d41482
Update starboard_configuration.py
isarkis Apr 19, 2023
59bce71
Update main.yaml
isarkis Apr 19, 2023
4310e72
Update main.yaml
isarkis Apr 19, 2023
43a74d3
Test change isarkis
isarkis Apr 19, 2023
c5a9dae
Disable Raspi-2 skia to test the concurrency stuff (#363)
kaidokert Apr 19, 2023
ea5ef56
Cure it all (#366)
isarkis Apr 19, 2023
9fc153e
Update .gitignore
isarkis Apr 19, 2023
6fd296f
Only trigger presubmit for 'on_device' and 'runtest' labels
isarkis Apr 19, 2023
0bc9725
Handle win workflows
isarkis Apr 19, 2023
f69df8d
Update .codespellignorelines
isarkis Apr 20, 2023
2c62eb7
Add event.action to concurrency.
isarkis Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespellignorelines
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
GrMipMapped::kNo, texture_info));
Onces represent initializations that should only ever happen once per process,
<Resource Language="TE" />

2 changes: 1 addition & 1 deletion .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main
- feature/*
schedule:
- cron: '0 4 * * *'
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- feature/*

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true

permissions: {}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
STARBOARD_TOOLCHAINS_DIR: /root/starboard-toolchains

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ github.event.action }}-${{ inputs.platform }} @ ${{ github.event.pull_request.number || github.sha }}'
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -50,10 +50,12 @@ jobs:
if: |
github.event_name != 'pull_request' ||
(
github.event.pull_request.draft == false ||
( github.event.pull_request.draft == false &&
github.event.action != 'labeled' ) ||
(
github.event.action == 'labeled' &&
github.event.label.name == 'runtest'
( github.event.label.name == 'runtest' ||
github.event.label.name == 'on_device' )
)
)
steps:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/main_win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
STARBOARD_TOOLCHAINS_DIR: /root/starboard-toolchains

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -51,11 +51,10 @@ jobs:
if: |
github.event_name != 'pull_request' ||
(
github.event.pull_request.draft == false ||
(
github.event.action == 'labeled' &&
github.event.label.name == 'runtest'
)
( github.event.pull_request.draft == false &&
github.event.action != 'labeled' ) ||
( github.event.action == 'labeled' &&
github.event.label.name == 'runtest' )
)
steps:
- id: Checkout
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_badges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ on:
- 'COBALT_9'

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true


permissions:
pull-requests: write

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main
- feature/*
schedule:
- cron: '0 4 * * *'
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
nightly:
Expand All @@ -29,11 +29,11 @@ jobs:
with:
platform: raspi-2
nightly: ${{ github.event.inputs.nightly }}
raspi-2-skia:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: raspi-2-skia
nightly: ${{ github.event.inputs.nightly }}
# raspi-2-skia:
# uses: ./.github/workflows/main.yaml
# permissions:
# packages: write
# pull-requests: write
# with:
# platform: raspi-2-skia
# nightly: ${{ github.event.inputs.nightly }}
26 changes: 26 additions & 0 deletions .github/workflows/test-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Test Report'
on:
workflow_run:
# runs after main workflow
workflows:
- evergreen
- linux
# TODO
# - win32
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
with:
name: unit-test-report
path: ${GITHUB_WORKSPACE}/test_results
- name: Create Report
uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226
with:
name: Cobalt Unit Tests
path: ${GITHUB_WORKSPACE}/test_results/**/*.xml
reporter: jest-junit
48 changes: 48 additions & 0 deletions .github/workflows/workflow_trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: workflow_trigger

on:
workflow_dispatch:
inputs:
branch:
type: choice
description: Branch
options:
- '23.lts.1+'
- '22.lts.1+'
- '21.lts.1+'
- '20.lts.1+'
- '19.lts.1+'
- 'rc_11'
- 'COBALT_9'
workflow:
type: choice
description: Workflow name
options:
- 'android'
- 'evergreen'
- 'linux'
- 'raspi'
- 'win32'
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

jobs:
trigger:
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: ${{github.event.branch}}
- name: Trigger Nightly
run: |
set -x
gh workflow run ${{github.event.inputs.workflow}}_${{github.event.inputs.branch}} --ref ${{github.event.inputs.branch}} -f nightly=${{github.event.inputs.nightly}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/venv/*
_certs/
.coverage

1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


group("gn_all") {
testonly = true

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Cobalt [![Build Status](https://img.shields.io/badge/-Build%20Status-blueviolet)](https://github.com/youtube/cobalt/blob/main/BUILD_STATUS.md)

Test change

## Overview

Cobalt is a lightweight application container (i.e. an application runtime, like
Expand Down Expand Up @@ -73,6 +71,8 @@ Chromium, FireFox, and IE:

## Architecture

One more test

The Cobalt Authors forked H5VCC, removed most of the Chromium code -- in
particular WebCore and the Chrome Renderer and Compositor -- and built up from
scratch an implementation of a simplified subset of HTML, the CSS Box Model for
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/algorithms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ std::string GetElementText(dom::Element* element) {
}

// There is a spec for "displayedness" available:
// https://w3c.github.io/webdriver/webdriver-spec.html#element-displayedness
// https://www.w3.org/TR/2015/WD-webdriver-20150808/#element-displayedness
// However, the algorithm described in the spec does not match existing
// implementations of WebDriver.
// IsDisplayed will match the existing implementations, using the implementation
Expand Down
4 changes: 2 additions & 2 deletions cobalt/webdriver/algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ namespace webdriver {
namespace algorithms {

// Implementation of getElementText algorithm.
// https://w3c.github.io/webdriver/webdriver-spec.html#getelementtext
// https://www.w3.org/TR/2015/WD-webdriver-20150808/#getelementtext
// The spec is not totally clear and, according to comments on the spec, does
// not exactly match the behavior of existing WebDriver implementations. This
// implementation will follow the de-facto standards where they differ.
std::string GetElementText(dom::Element* element);

// https://w3c.github.io/webdriver/webdriver-spec.html#element-displayedness
// https://www.w3.org/TR/2015/WD-webdriver-20150808/#element-displayedness
// The spec does not exactly match the behavior of existing WebDriver
// implementations. Consistency with existing implementations will be preferred
// over strict conformance to the draft spec.
Expand Down
6 changes: 3 additions & 3 deletions cobalt/webdriver/dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class WebDriverDispatcher {
};
// Send the result of the execution of a registered WebDriver command to be
// sent as a response as described in the spec:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Responses
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Failed-Commands
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#responses
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#failed-commands
virtual void SendResult(
const base::Optional<protocol::SessionId>& session_id,
protocol::Response::StatusCode status_code,
Expand All @@ -95,7 +95,7 @@ class WebDriverDispatcher {
// Some forms of Invalid Requests are detected in the CommandCallback by
// checking the path variables and command parameters. Invalid requests are
// described here:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Invalid-Requests
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#invalid-requests
//
// TODO: Invalid requests should be handled before calling the
// CommandCallback.
Expand Down
10 changes: 5 additions & 5 deletions cobalt/webdriver/element_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>

#include "cobalt/webdriver/element_driver.h"

#include <memory>

#include "cobalt/cssom/property_value.h"
#include "cobalt/cssom/viewport_size.h"
#include "cobalt/dom/document.h"
Expand Down Expand Up @@ -266,14 +266,14 @@ util::CommandResult<void> ElementDriver::SendClickInternal(
return CommandResult(protocol::Response::kElementNotVisible);
}
// Click on an element.
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidelementidclick
// The Element Click clicks the in-view center point of the element
// https://w3c.github.io/webdriver/webdriver-spec.html#dfn-element-click
// https://www.w3.org/TR/2015/WD-webdriver-20150808/#click

// An element's in-view center point is the origin position of the rectangle
// that is the intersection between the element's first DOM client rectangle
// and the initial viewport.
// https://w3c.github.io/webdriver/webdriver-spec.html#dfn-in-view-center-point
// https://www.w3.org/TR/2017/WD-webdriver-20170125/#dfn-in-view-center-point
scoped_refptr<dom::DOMRectList> dom_rects = element_->GetClientRects();
if (dom_rects->length() == 0) {
return CommandResult(protocol::Response::kElementNotVisible);
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/element_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WindowDriver;

// ElementDriver could be considered a WebElement as described in the WebDriver
// spec.
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#webelement
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#webelement
// Commands that interact with a WebElement, such as:
// /session/:sessionId/element/:id/some_command
// will map to a method on this class.
Expand Down
6 changes: 3 additions & 3 deletions cobalt/webdriver/protocol/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ namespace protocol {

// Represents the JSON parameters passed to the click, buttondown, and buttonup
// WebDriver commands.
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttondown
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttonup
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidelementidclick
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidbuttondown
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidbuttonup
class Button {
public:
static std::unique_ptr<base::Value> ToValue(const Button& button);
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/capabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Capabilities {
private:
Capabilities() {}
// The capabilities listed here:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Capabilities-JSON-Object
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#capabilities-json-object

base::Optional<std::string> browser_name_;
base::Optional<std::string> version_;
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/cookie.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace cobalt {
namespace webdriver {
namespace protocol {

// https://w3c.github.io/webdriver/webdriver-spec.html#cookies
// https://www.w3.org/TR/2015/WD-webdriver-20150808/#cookies
class Cookie {
public:
static std::unique_ptr<base::Value> ToValue(const Cookie& cookie);
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/element_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ElementId {
static const char kElementKey[];

// Convert the ElementId to a WebElement JSON object:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#WebElement-JSON-Object
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#webelement-json-object
static std::unique_ptr<base::Value> ToValue(const ElementId& element_id);
static base::Optional<ElementId> FromValue(const base::Value* value);

Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/frame_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace cobalt {
namespace webdriver {
namespace protocol {

// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidframe
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidframe
// Since Cobalt doesn't support multiple frames, the only valid value for this
// command is to request switching to the top-level browsing context, which
// is always active.
Expand Down
6 changes: 3 additions & 3 deletions cobalt/webdriver/protocol/log_entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>

#include "cobalt/webdriver/protocol/log_entry.h"

#include <memory>

#include "base/logging.h"

namespace cobalt {
Expand Down Expand Up @@ -48,7 +48,7 @@ std::unique_ptr<base::Value> LogEntry::ToValue(const LogEntry& log_entry) {
std::unique_ptr<base::DictionaryValue> log_entry_value(
new base::DictionaryValue());
// Format of the Log Entry object can be found here:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Log-Entry-JSON-Object
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#log-entry-json-object
// timestamp is in milliseconds since the Unix Epoch.
log_entry_value->SetInteger("timestamp",
log_entry.timestamp_.InMilliseconds());
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/log_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace webdriver {
namespace protocol {

// Log entry object:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#Log-Entry-JSON-Object
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#log-entry-json-object
class LogEntry {
public:
enum LogLevel {
Expand Down
2 changes: 1 addition & 1 deletion cobalt/webdriver/protocol/moveto.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace webdriver {
namespace protocol {

// Represents the JSON parameters passed to the moveto WebDriver command.
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidmoveto
// https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidmoveto
class Moveto {
public:
static std::unique_ptr<base::Value> ToValue(const Moveto& moveto);
Expand Down
Loading