tools: remove github reporter

PR-URL: https://github.com/nodejs/node/pull/56468
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
pull/56574/head
Carlos Espa 2025-01-15 00:08:39 +01:00 committed by GitHub
parent 7b60bcb2f0
commit afaa14b5ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 2 additions and 20318 deletions

View File

@ -22,7 +22,6 @@ on:
- cjs-module-lexer
- corepack
- doc
- github_reporter
- googletest
- gyp-next
- histogram
@ -135,14 +134,6 @@ jobs:
npm install --ignore-scripts $NEW_VERSION
npm install --ignore-scripts
fi
- id: github_reporter
subsystem: tools
label: tools
run: |
./tools/dep_updaters/update-github-reporter.sh > temp-output
cat temp-output
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
rm temp-output
- id: googletest
subsystem: deps
label: dependencies, test

View File

@ -49,7 +49,6 @@ export default [
'test/.tmp.*/**',
'test/addons/??_*',
'test/fixtures/**',
'tools/github_reporter/**',
],
},
// #endregion

View File

@ -4,8 +4,7 @@ exclude = [
"tools/cpplint.py",
"tools/gyp",
"tools/inspector_protocol",
"tools/eslint/node_modules",
"tools/github_reporter"
"tools/eslint/node_modules"
]
line-length = 172
target-version = "py38"

View File

@ -1,44 +0,0 @@
#!/bin/sh
# Shell script to update @reporters/github in the source tree to the latest release.
# This script must be in the tools directory when it runs because it uses the
# script source file path to determine directories to work in.
set -ex
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
[ -x "$NODE" ] || NODE=$(command -v node)
NPM="$ROOT/deps/npm/bin/npm-cli.js"
# shellcheck disable=SC1091
. "$ROOT/tools/dep_updaters/utils.sh"
NEW_VERSION=$("$NODE" "$NPM" view @reporters/github dist-tags.latest)
CURRENT_VERSION=$("$NODE" -p "require('./tools/github_reporter/package.json').version")
# This function exit with 0 if new version and current version are the same
compare_dependency_version "@reporters/github" "$NEW_VERSION" "$CURRENT_VERSION"
cd "$( dirname "$0" )/../.." || exit
rm -rf tools/github_reporter
(
rm -rf github-reporter-tmp
mkdir github-reporter-tmp
cd github-reporter-tmp || exit
"$NODE" "$NPM" init --yes
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts "@reporters/github@$NEW_VERSION"
"$NODE" "$NPM" exec --package=esbuild@0.17.15 --yes -- esbuild ./node_modules/@reporters/github --bundle --platform=node --outfile=bundle.js
)
mkdir tools/github_reporter
mv github-reporter-tmp/bundle.js tools/github_reporter/index.js
mv github-reporter-tmp/node_modules/@reporters/github/package.json tools/github_reporter/package.json
rm -rf github-reporter-tmp/
# The last line of the script should always print the new version,
# as we need to add it to $GITHUB_ENV variable.
echo "NEW_VERSION=$NEW_VERSION"

File diff suppressed because one or more lines are too long

View File

@ -1,31 +0,0 @@
{
"name": "@reporters/github",
"version": "1.7.2",
"description": "A github actions reporter for `node:test`",
"type": "commonjs",
"keywords": [
"github actions",
"node:test",
"test",
"reporter",
"reporters"
],
"dependencies": {
"@actions/core": "^1.10.0",
"stack-utils": "^2.0.6"
},
"files": [
"./index.js"
],
"scripts": {
"test": "node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./index.js --test-reporter-destination=stdout --test"
},
"bugs": {
"url": "https://github.com/MoLow/reporters/issues"
},
"main": "index.js",
"homepage": "https://github.com/MoLow/reporters/tree/main/packages/github",
"repository": "https://github.com/MoLow/reporters.git",
"author": "Moshe Atlow",
"license": "MIT"
}

View File

@ -317,7 +317,7 @@ class DotsProgressIndicator(SimpleProgressIndicator):
class ActionsAnnotationProgressIndicator(DotsProgressIndicator):
def AboutToRun(self, case):
case.additional_flags = case.additional_flags.copy() if hasattr(case, 'additional_flags') else []
case.additional_flags.append('--test-reporter=./tools/github_reporter/index.js')
case.additional_flags.append('--test-reporter=./test/common/test-error-reporter.js')
case.additional_flags.append('--test-reporter-destination=stdout')
def GetAnnotationInfo(self, test, output):