Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/test/typescript-5.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiJay-WMDE authored Mar 25, 2024
2 parents b1bfd03 + 50c4a0a commit 699a6d9
Show file tree
Hide file tree
Showing 107 changed files with 1,000 additions and 940 deletions.
20 changes: 10 additions & 10 deletions .github/actions/pull-ghcr/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "pull-ghcr"
description: "Pull all from GHCR"
name: pull-ghcr
description: Pull all from GHCR
inputs:
github_token:
description: "token to access GHCR"
description: token to access GHCR
required: true

runs:
using: "composite"
using: composite

steps:
- name: Login to GitHub Container Registry
Expand All @@ -21,12 +21,12 @@ runs:
set -x
images=(
"wikibase"
"wikibase-bundle"
"elasticsearch"
"wdqs"
"wdqs-frontend"
"wdqs-proxy"
"wikibase"
"wikibase-bundle"
"elasticsearch"
"wdqs"
"wdqs-frontend"
"wdqs-proxy"
"quickstatements"
)
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/push-ghcr/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: "push-ghcr"
description: "Push to GHCR"
name: push-ghcr
description: Push to GHCR
inputs:
docker_image:
description: "name of the docker image to push"
description: name of the docker image to push
required: true
github_token:
description: "token to access GHCR"
description: token to access GHCR
required: true

runs:
using: "composite"
using: composite

steps:
- uses: docker/login-action@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/scan-image/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "scan-image"
description: "Scan image and upload results"
name: scan-image
description: Scan image and upload results
inputs:
image_name:
description: "name of the docker image to work with"
description: name of the docker image to work with
required: true

runs:
using: "composite"
using: composite

steps:
- uses: anchore/scan-action@v3
Expand Down
90 changes: 47 additions & 43 deletions .github/reporter/report.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
const fs = require( 'fs' )
const { extractModuleLineAndColumn } = require('mocha-json-streamier-reporter/lib/parse-stack-trace')
var core = require('@actions/core');
var { issueCommand } = require('@actions/core/lib/command');
const fs = require( 'fs' );
const {
extractModuleLineAndColumn
} = require( 'mocha-json-streamier-reporter/lib/parse-stack-trace' );
const core = require( '@actions/core' );
const { issueCommand } = require( '@actions/core/lib/command' );

const suiteName = process.argv[2];
const suiteName = process.argv[ 2 ];

if( suiteName ) {
return;
if ( suiteName ) {
return;
}

const filePath = `../../test/suites/${suiteName}/results/result.json`;

var resultObject = {};

if (fs.existsSync(filePath)) {
resultObject = JSON.parse(fs.readFileSync(filePath, 'utf8'))[suiteName];

if (resultObject.fail.length != 0) {

resultObject.fail.forEach(test => {
const error = extractModuleLineAndColumn(test.error.stack);
let filePath = '';
if( error.file ) {
filePath = error.file.replace('/usr/src/app/', 'test/');
}
const message = test.fullTitle + ": " + test.error.message;

issueCommand('error', {
file: filePath,
line: error.line,
col: error.column
}, message);
});

} else {
resultObject.pass.forEach(test => {
core.info( 'OK: ' + test.fullTitle );
});

resultObject.skip.forEach(test => {
core.warning( 'SKIP: ' + test.fullTitle );
});

core.info('\u001b[1mAll good 👍')
}
const filePath = `../../test/suites/${ suiteName }/results/result.json`;

let resultObject = {};

if ( fs.existsSync( filePath ) ) {
resultObject = JSON.parse( fs.readFileSync( filePath, 'utf8' ) )[ suiteName ];

if ( resultObject.fail.length != 0 ) {
resultObject.fail.forEach( ( test ) => {
const error = extractModuleLineAndColumn( test.error.stack );
let filePath = '';
if ( error.file ) {
filePath = error.file.replace( '/usr/src/app/', 'test/' );
}
const message = test.fullTitle + ': ' + test.error.message;

issueCommand(
'error',
{
file: filePath,
line: error.line,
col: error.column
},
message
);
} );
} else {
resultObject.pass.forEach( ( test ) => {
core.info( 'OK: ' + test.fullTitle );
} );

resultObject.skip.forEach( ( test ) => {
core.warning( 'SKIP: ' + test.fullTitle );
} );

core.info( '\u001b[1mAll good 👍' );
}
} else {
core.error('No tests executed!');
core.error( 'No tests executed!' );
}
66 changes: 28 additions & 38 deletions .github/workflows/_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ jobs:
fail-fast: false
matrix:
component:
[
"wikibase",
"elasticsearch",
"wdqs",
"wdqs-frontend",
"wdqs-proxy",
"quickstatements"
]
- wikibase
- elasticsearch
- wdqs
- wdqs-frontend
- wdqs-proxy
- quickstatements

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -70,22 +68,18 @@ jobs:
fail-fast: false
matrix:
suite:
[
repo,
fedprops,
repo_client,
quickstatements,
pingback,
confirm_edit,
elasticsearch,

base__repo,
base__repo_client,
base__pingback,
base__fedprops,

example
]
- repo
- fedprops
- repo_client
- quickstatements
- pingback
- confirm_edit
- elasticsearch
- base__repo
- base__repo_client
- base__pingback
- base__fedprops
- example

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -122,20 +116,16 @@ jobs:
fail-fast: false
matrix:
# TODO: can we get this from the environment to not have it hardcoded in the pipeline code?
version: [
# Latest 1.37
"WMDE9",
"WMDE9_BUNDLE",
# Latest 1.38
"WMDE12",
"WMDE12_BUNDLE",
# Latest 1.39
"WMDE15",
"WMDE15_BUNDLE",
# Previous 1.40
"WMDE14",
"WMDE14_BUNDLE"
]
version:
# Latest 1.38
- WMDE12
- WMDE12_BUNDLE
# Latest 1.39
- WMDE15
- WMDE15_BUNDLE
# Latest 1.40
- WMDE16
- WMDE16_BUNDLE

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_test_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 🧪 Build and Test main
on:
push:
branches:
- "main"
- main

jobs:
_:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build_test_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: docker/login-action@v3
with:
# implicitly docker hub
username: "roti4wmde" # TODO: get a bot user
username: roti4wmde # TODO: get a bot user
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Push release to dockerhub
Expand All @@ -69,12 +69,12 @@ jobs:
docker image ls
images=(
"wikibase"
"wikibase-bundle"
"elasticsearch"
"wdqs"
"wdqs-frontend"
"wdqs-proxy"
"wikibase"
"wikibase-bundle"
"elasticsearch"
"wdqs"
"wdqs-frontend"
"wdqs-proxy"
"quickstatements"
)
Expand Down
Loading

0 comments on commit 699a6d9

Please sign in to comment.