Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga committed Jul 16, 2024
1 parent f2c89fd commit 41df33b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/plugins_react_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ jobs:
with:
repository: ${{ matrix.plugin }}
path: ${{ github.workspace }}/projects/plugin
- name: store plugin name
run: echo "PLUGIN_NAME=$(echo ${{ matrix.plugin }} | awk -F'/' '{print $NF}')" >> "${GITHUB_ENV}"
- name: Set up plugin in Foreman
run: |
echo "gemspec name: $PLUGIN_NAME, path: '/projects/plugin'" > "bundler.d/$PLUGIN_NAME.local.rb"
if [ -d $PLUGIN_NAME/gemfile.d ] ; then
cat $PLUGIN_NAME/gemfile.d/*.rb >> bundler.d/$PLUGIN_NAME.local.rb
fi
working-directory: ${{ github.workspace }}/projects/foreman
- name: Generate ${{ matrix.plugin }} npm dependencies package-lock
run: npm install --package-lock-only --no-audit --legacy-peer-deps
working-directory: ${{ github.workspace }}/projects/plugin
Expand Down
3 changes: 2 additions & 1 deletion script/npm_test_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function runChildProcess(args, pluginPath) {
}
const runTests = async () => {
var dirs = packageJsonDirs();
console.log('dirs', dirs);
function pluginDefinesLint(pluginPath) {
var packageHasNodeModules = fs.existsSync(`${pluginPath}/node_modules`); // skip gems
var packageData = JSON.parse(fs.readFileSync(`${pluginPath}/package.json`));
Expand Down Expand Up @@ -125,7 +126,7 @@ const runTests = async () => {
'--color',
...passedArgs,
];

console.log('args', args);
// eslint-disable-next-line no-await-in-loop
await runChildProcess(args, pluginPath); // Run every plugin test in a separate process
if (fs.existsSync(combinedConfigPath)) {
Expand Down
12 changes: 10 additions & 2 deletions script/plugin_webpack_directories.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ var webpackedDirs = stderr => {
});
};

var getPluginDirs = stderr =>
JSON.parse(sanitizeWebpackDirs(webpackedDirs(stderr)));
var getPluginDirs = stderr => {
console.log('stderr', stderr);

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 3.0, 14)

Unexpected console statement

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 3.0, 14)

You have a misspelled word: stderr on String

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 2.7, 14)

Unexpected console statement

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 2.7, 14)

You have a misspelled word: stderr on String

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 3.0, 18)

Unexpected console statement

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 3.0, 18)

You have a misspelled word: stderr on String

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 2.7, 18)

Unexpected console statement

Check warning on line 51 in script/plugin_webpack_directories.js

View workflow job for this annotation

GitHub Actions / test (13, 2.7, 18)

You have a misspelled word: stderr on String
// console.log('webpackedDirs', webpackedDirs(stderr));
// console.log(
// 'sanitizeWebpackDirs',
// // sanitizeWebpackDirs(webpackedDirs(stderr))
// JSON.parse(sanitizeWebpackDirs(webpackedDirs(stderr)))
// );
return JSON.parse(sanitizeWebpackDirs(webpackedDirs(stderr)));
};

var packageJsonDirs = stderr =>
pluginPath('package.json')(getPluginDirs(stderr)).map(path.dirname);
Expand Down

0 comments on commit 41df33b

Please sign in to comment.