Skip to content

Commit 897f108

Browse files
authored
Fix webui test & warnings (#45)
* Fix webui test & warnings * Add --exit option for mocha test * Bump github action version --------- Co-authored-by: Anmol Chopra <[email protected]>
1 parent ad0f5c1 commit 897f108

File tree

10 files changed

+982
-556
lines changed

10 files changed

+982
-556
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ jobs:
1515
go-version: [1.22.x, 1.23.x]
1616
steps:
1717
- name: Install Go@v${{ matrix.go-version }}
18-
uses: actions/setup-go@v2
18+
uses: actions/setup-go@v4
1919
with:
2020
go-version: ${{ matrix.go-version }}
2121
- name: Checkout code
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323
# See https://github.com/actions/cache/blob/master/examples.md#go---modules
24-
- uses: actions/cache@v2
24+
- uses: actions/cache@v3
2525
with:
26-
path: ~/go/pkg/mod
26+
path: |
27+
~/.cache/go-build
28+
~/go/pkg/mod
2729
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2830
restore-keys: |
2931
${{ runner.os }}-go-
@@ -38,16 +40,16 @@ jobs:
3840
# See https://docs.github.com/en/actions/guides/building-and-testing-nodejs
3941
steps:
4042
- name: Install Node.js
41-
uses: actions/setup-node@v1
43+
uses: actions/setup-node@v4
4244
with:
43-
node-version: '12.x'
45+
node-version: '20.x'
4446
- name: Checkout code
45-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4648
# See https://github.com/actions/cache/blob/master/examples.md#node---yarn
4749
- name: Get yarn cache directory path
4850
id: yarn-cache-dir-path
49-
run: echo "::set-output name=dir::$(yarn cache dir)"
50-
- uses: actions/cache@v2
51+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
52+
- uses: actions/cache@v3
5153
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
5254
with:
5355
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

webui/internal/assets/assets.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webui/internal/assets/build/work.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webui/internal/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"scripts": {
4-
"test": "mocha 'src/**/*.test.js' --require babel-register --require ignore-styles; exit 0",
4+
"test": "mocha 'src/**/*.test.js' --require babel-register --require ignore-styles --exit; exit 0",
55
"dev": "webpack --progress",
66
"build": "webpack --progress --config webpack.production.config.js",
77
"lint": "eslint src; exit 0",

webui/internal/assets/src/DeadJobs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class DeadJobs extends React.Component {
3737
});
3838
}
3939

40-
componentWillMount() {
40+
componentDidMount() {
4141
this.fetch();
4242
}
4343

webui/internal/assets/src/Processes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class Processes extends React.Component {
6666
workerPool: []
6767
}
6868

69-
componentWillMount() {
69+
componentDidMount() {
7070
if (this.props.busyWorkerURL) {
7171
fetch(this.props.busyWorkerURL).
7272
then((resp) => resp.json()).

webui/internal/assets/src/Queues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class Queues extends React.Component {
1212
queues: []
1313
}
1414

15-
componentWillMount() {
15+
componentDidMount() {
1616
if (!this.props.url) {
1717
return;
1818
}

webui/internal/assets/src/RetryJobs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class RetryJobs extends React.Component {
3131
});
3232
}
3333

34-
componentWillMount() {
34+
componentDidMount() {
3535
this.fetch();
3636
}
3737

webui/internal/assets/src/ScheduledJobs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class ScheduledJobs extends React.Component {
3131
});
3232
}
3333

34-
componentWillMount() {
34+
componentDidMount() {
3535
this.fetch();
3636
}
3737

0 commit comments

Comments
 (0)