Skip to content

Cleanup III #603

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

Merged
merged 51 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c8d8c42
Spacing
RickiJay-WMDE Mar 5, 2024
e541ad8
Volumes
RickiJay-WMDE Mar 5, 2024
aeda767
Results
RickiJay-WMDE Mar 5, 2024
ae46cd1
Merge branch 'main' into cleanup-III
RickiJay-WMDE Mar 5, 2024
e8ade40
Black
RickiJay-WMDE Mar 5, 2024
d807ce5
Results
RickiJay-WMDE Mar 5, 2024
7f1f95d
Simpler
RickiJay-WMDE Mar 5, 2024
a436ab7
Dedupe
RickiJay-WMDE Mar 5, 2024
b67eaed
Less Smelly
RickiJay-WMDE Mar 5, 2024
579e042
Simpler
RickiJay-WMDE Mar 5, 2024
bb1a5d1
Merge branch 'main' into cleanup-III
RickiJay-WMDE Mar 6, 2024
294f615
MD
RickiJay-WMDE Mar 6, 2024
ce206bf
Results
RickiJay-WMDE Mar 6, 2024
f17da92
Cleanup
RickiJay-WMDE Mar 6, 2024
f0c3cf1
"proseWrap": "never"
RickiJay-WMDE Mar 6, 2024
096233c
Dedupe
RickiJay-WMDE Mar 7, 2024
d360430
Simplify
RickiJay-WMDE Mar 12, 2024
9ddd8f7
Lint Javascript
RickiJay-WMDE Mar 12, 2024
7fbc51b
Simplify
RickiJay-WMDE Mar 12, 2024
5087c43
Clarity
RickiJay-WMDE Mar 12, 2024
5205944
md
RickiJay-WMDE Mar 12, 2024
c54b94b
Multiple
RickiJay-WMDE Mar 12, 2024
c8b4856
Consistent Rules
RickiJay-WMDE Mar 13, 2024
a84b6d1
rename read-file-encoding
RickiJay-WMDE Mar 14, 2024
9cd7a43
rename check-if-up
RickiJay-WMDE Mar 14, 2024
2103bb2
rename load-env-files
RickiJay-WMDE Mar 14, 2024
efb8cc8
rename test-env
RickiJay-WMDE Mar 14, 2024
441b692
File Exists
RickiJay-WMDE Mar 14, 2024
36245aa
rename make-test-settings
RickiJay-WMDE Mar 14, 2024
a19a5c4
Rename Specs
RickiJay-WMDE Mar 14, 2024
ba5b56d
isfile
RickiJay-WMDE Mar 14, 2024
a0587aa
rename test-settings
RickiJay-WMDE Mar 15, 2024
1819b3b
Imminent Deprecation
RickiJay-WMDE Mar 15, 2024
1f5ebe4
II
RickiJay-WMDE Mar 15, 2024
8a961da
Fix
RickiJay-WMDE Mar 15, 2024
42e3de7
Backwards
RickiJay-WMDE Mar 18, 2024
0e08045
Not Undefined
RickiJay-WMDE Mar 18, 2024
c30d486
Single-Use Variables
RickiJay-WMDE Mar 18, 2024
ada778b
toEqual
RickiJay-WMDE Mar 18, 2024
77195cf
includes
RickiJay-WMDE Mar 18, 2024
2c17d78
stringMatching
RickiJay-WMDE Mar 18, 2024
ed27361
Commented
RickiJay-WMDE Mar 19, 2024
71fb157
Include
RickiJay-WMDE Mar 20, 2024
e9c22b3
page
RickiJay-WMDE Mar 20, 2024
ee2c2e6
Organize
RickiJay-WMDE Mar 20, 2024
2463de2
Deprecated
RickiJay-WMDE Mar 20, 2024
4f33669
toMatch
RickiJay-WMDE Mar 21, 2024
fe218fe
Merge branch 'main' into cleanup-III
RickiJay-WMDE Mar 25, 2024
45f3236
package.json
RickiJay-WMDE Mar 25, 2024
9bbfb85
Results
RickiJay-WMDE Mar 25, 2024
3364fc0
style: indention
rti Mar 25, 2024
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
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!' );
}
63 changes: 28 additions & 35 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,17 +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.38
"WMDE12",
"WMDE12_BUNDLE",
# Latest 1.39
"WMDE15",
"WMDE15_BUNDLE",
# Latest 1.40
"WMDE16",
"WMDE16_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