Skip to content

Commit

Permalink
Bug 1651991 [wpt PR 24556] - [Taskcluster] Make lint create a GitHub …
Browse files Browse the repository at this point in the history
…Checks output file, a=testonly

Automatic update from web-platform-tests
[Taskcluster] Make lint create a GitHub Checks output file (#24556)

See web-platform-tests/wpt#15412
--

wpt-commits: 8420fdfa2c9124b1f7b1eaf64517c5b3fc3f072b
wpt-pr: 24556

UltraBlame original commit: a6e4b389013941a0c67a2ed4b32796bfa59bcb23
  • Loading branch information
marco-c committed Sep 16, 2020
1 parent ba06caf commit 725a7d9
Show file tree
Hide file tree
Showing 6 changed files with 547 additions and 51 deletions.
164 changes: 138 additions & 26 deletions testing/web-platform/tests/tools/ci/tc/github_checks_output.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
MYPY
=
False
if
MYPY
:

#
MYPY
is
set
to
True
when
run
under
Mypy
.

from
typing
import
Any

from
typing
import
Optional

from
typing
import
Text
class
GitHubChecksOutputter
(
Expand Down Expand Up @@ -107,6 +140,16 @@
)
:

#
type
:
(
Text
)
-
>
None

self
.
path
Expand All @@ -121,6 +164,68 @@
)
:

#
type
:
(
Any
)
-
>
None

#
TODO
(
stephenmcgruer
)
:
Once
mypy
0
.
790
is
released
we
can
change
this

#
to
AnyStr
as
that
release
teaches
mypy
about
the
mode
flags
of
open
.

#
See
https
:
/
/
github
.
com
/
python
/
typeshed
/
pull
/
4146

with
open
(
Expand Down Expand Up @@ -157,10 +262,26 @@
def
get_gh_checks_outputter
(
kwargs
filepath
)
:

#
type
:
(
Optional
[
Text
]
)
-
>
Optional
[
GitHubChecksOutputter
]

"
"
"
Expand All @@ -177,23 +298,24 @@

:
param
kwargs
filepath
:
The
arguments
passed
filepath
to
the
program
(
write
GitHub
Check
output
information
to
look
for
the
github_checks_text_file
field
)
or
None
if
not
enabled
.

"
"
Expand All @@ -203,12 +325,7 @@
__outputter

if
kwargs
[
'
github_checks_text_file
'
]
filepath
and
__outputter
is
Expand All @@ -219,12 +336,7 @@
=
GitHubChecksOutputter
(
kwargs
[
'
github_checks_text_file
'
]
filepath
)

return
Expand Down
20 changes: 20 additions & 0 deletions testing/web-platform/tests/tools/ci/tc/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,26 @@ lint
-
-
all
-
-
github
-
checks
-
text
-
file
=
/
home
/
test
/
artifacts
/
checkrun
.
md
"
-
update
Expand Down
Loading

0 comments on commit 725a7d9

Please sign in to comment.