Skip to content

Commit

Permalink
Merge branch 'master' into fault-mgmt-e2e-type
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenry authored Oct 2, 2024
2 parents e75bd7f + 67fac94 commit e369cd9
Show file tree
Hide file tree
Showing 65 changed files with 3,285 additions and 837 deletions.
17 changes: 16 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
"browser": true,
"es6": true,
"jasmine": true,
"amd": true
"amd": false
},
"extends": "eslint:recommended",
"parser": "@babel/eslint-parser",
Expand All @@ -37,7 +37,16 @@ module.exports = {
"impliedStrict": true
}
},
"plugins": ['import'],
"rules": {
'import/no-amd': 'error',
'import/no-commonjs': 'error',
'import/named': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/first': 'error',
'import/no-import-module-exports': 'error',
'import/no-mutable-exports': 'error',
'import/no-unused-modules': 'error',
"no-bitwise": "error",
"curly": "error",
"eqeqeq": "error",
Expand Down Expand Up @@ -237,6 +246,12 @@ module.exports = {
"varsIgnorePattern": "controller"
}
]
}
},
{
"files": ['*.eslintrc.cjs'],
"env": {
"node": true
}
}
]
Expand Down
7 changes: 3 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op

* [ ] Have you followed the guidelines in our [Contributing document](https://github.com/nasa/openmct/blob/master/CONTRIBUTING.md)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/nasa/openmct/pulls) for the same update/change?
* [ ] Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.
* [ ] Is this a [notable change](../docs/src/process/release.md) that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

### Author Checklist

* [ ] Changes address original issue?
* [ ] Tests included and/or updated with changes?
* [ ] Command line build passes?
* [ ] Has this been smoke tested?
* [ ] Have you associated this PR with a `type:` label? Note: this is not necessarily the same as the original issue.
* [ ] Have you associated a milestone with this PR? Note: leave blank if unsure.
* [ ] Testing instructions included in associated issue OR is this a dependency/testcase change?

### Reviewer Checklist
Expand All @@ -25,5 +26,3 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op
* [ ] Changes appear not to be breaking changes?
* [ ] Appropriate automated tests included?
* [ ] Code style and in-line documentation are appropriate?
* [ ] Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
* [ ] Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)
18 changes: 15 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: npm install and build:example
name: npm install, build, and lint

on:
push:
Expand All @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [20.x, 18.x]
openmct-version:
- latest
- stable
Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand All @@ -31,3 +31,15 @@ jobs:
elif [ "${{ matrix.openmct-version }}" = "stable" ]; then
npm run build:example
fi
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm install
- name: Run lint
run: npm run lint
29 changes: 13 additions & 16 deletions .github/workflows/yamcs-quickstart-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,45 @@ jobs:
matrix:
yamcs-version:
- default
- 5.8.3 #viper
- 5.9.8 #viper
## disabling until we get confirmation- 5.3.2 #ab
openmct-version:
- latest
- stable
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
- uses: actions/checkout@v3
with:
repository: yamcs/quickstart
ref: master
path: 'quickstart'
- name: replace yamcsVersion with matrix param
if: matrix.yamcs-version != 'default'
run: |
cd quickstart
mvn -B versions:set-property -Dproperty=yamcsVersion -DnewVersion=${{ matrix.yamcs-version }}
working-directory: quickstart
- name: trigger make all from docker dir. Orphan and redirect output to docker/makeout.txt
run: |
cd quickstart/docker
touch makeout.txt
make all &> makeout.txt &
make all-10hz &> makeout.txt &
working-directory: quickstart/docker
- run: npm install
- name: Get Open MCT e2e tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: npm run test:getopensource
- name: Run build:example based on openmct-version
run: |
if [ "${{ matrix.openmct-version }}" = "latest" ]; then
npm run build:example:master
elif [ "${{ matrix.openmct-version }}" = "stable" ]; then
npm run build:example
fi
- run: npx [email protected] install chromium
- name: Get Open MCT e2e tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: npm run test:getopensource
- run: npx [email protected] install chromium
- name: Check that yamcs is available
run: |
docker ps -a
Expand All @@ -74,9 +73,7 @@ jobs:
echo "Error: Unable to fetch Yamcs version. HTTP status code: $response"
exit 1
fi
- name: Run Quickstart tests and publish to deploysentinel
env:
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
- name: Run Quickstart tests
run: npm run test:e2e:quickstart
- name: Capture docker logs to file
if: always()
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ test-results

# Misc
.DS_Store
.vscode/settings.json

quickstart/
31 changes: 17 additions & 14 deletions .webpack/webpack.common.js → .webpack/webpack.common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/

const path = require('path');
const projectRootDir = path.resolve(__dirname, '..');
import path from 'node:path';
import { fileURLToPath } from 'node:url';

// eslint-disable no-undef
const WEBPACK_COMMON_CONFIG = {
const projectRootDir = fileURLToPath(new URL('../', import.meta.url));

/** @type {import('webpack').Configuration} */
const commonConfig = {
context: projectRootDir,
performance: {
hints: false
},
resolve: {
alias: {
saveAs: "file-saver/src/FileSaver.js",
}
entry: {
'openmct-yamcs': './src/openmct-yamcs.js'
},
module: {
rules: [
Expand All @@ -40,17 +41,19 @@ const WEBPACK_COMMON_CONFIG = {
enforce: "pre",
use: ["source-map-loader"]
}
]
],
},
output: {
globalObject: "this",
filename: '[name].js',
// eslint-disable-next-line no-undef
path: path.resolve(projectRootDir, 'dist'),
libraryTarget: 'umd',
library: 'openmctYamcs'
library: {
type: 'umd',
export: 'default',
name: 'openmctYamcs'
}
}
};

// eslint-disable-next-line no-undef
module.exports = WEBPACK_COMMON_CONFIG;
export default commonConfig;

12 changes: 4 additions & 8 deletions .webpack/webpack.coverage.js → .webpack/webpack.coverage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,24 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/

const config = require('./webpack.dev');
// eslint-disable-next-line no-undef
const CI = process.env.CI === 'true';
import config from './webpack.dev.mjs';

config.devtool = CI ? false : undefined;
config.devtool = 'source-map';

config.devServer.hot = false;

config.module.rules.push({
test: /\.js$/,
test: /\.(mjs|js)$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
options: {
retainLines: true,
// eslint-disable-next-line no-undef
plugins: [['babel-plugin-istanbul', {
extension: ['.js']
}]]
}
}
});

// eslint-disable-next-line no-undef
module.exports = config;
export default config;
63 changes: 0 additions & 63 deletions .webpack/webpack.dev.js

This file was deleted.

Loading

0 comments on commit e369cd9

Please sign in to comment.