Skip to content

Commit

Permalink
Fix webui test & warnings (#45)
Browse files Browse the repository at this point in the history
* Fix webui test & warnings

* Add --exit option for mocha test

* Bump github action version

---------

Co-authored-by: Anmol Chopra <anmol.chopra@gojek.com>
  • Loading branch information
chopraanmol1 and chopraanmol1 authored Oct 4, 2024
1 parent ad0f5c1 commit 897f108
Show file tree
Hide file tree
Showing 10 changed files with 982 additions and 556 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
go-version: [1.22.x, 1.23.x]
steps:
- name: Install Go@v${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
# See https://github.com/actions/cache/blob/master/examples.md#go---modules
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Expand All @@ -38,16 +40,16 @@ jobs:
# See https://docs.github.com/en/actions/guides/building-and-testing-nodejs
steps:
- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: '20.x'
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
# See https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
6 changes: 3 additions & 3 deletions webui/internal/assets/assets.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webui/internal/assets/build/work.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webui/internal/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"test": "mocha 'src/**/*.test.js' --require babel-register --require ignore-styles; exit 0",
"test": "mocha 'src/**/*.test.js' --require babel-register --require ignore-styles --exit; exit 0",
"dev": "webpack --progress",
"build": "webpack --progress --config webpack.production.config.js",
"lint": "eslint src; exit 0",
Expand Down
2 changes: 1 addition & 1 deletion webui/internal/assets/src/DeadJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class DeadJobs extends React.Component {
});
}

componentWillMount() {
componentDidMount() {
this.fetch();
}

Expand Down
2 changes: 1 addition & 1 deletion webui/internal/assets/src/Processes.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class Processes extends React.Component {
workerPool: []
}

componentWillMount() {
componentDidMount() {
if (this.props.busyWorkerURL) {
fetch(this.props.busyWorkerURL).
then((resp) => resp.json()).
Expand Down
2 changes: 1 addition & 1 deletion webui/internal/assets/src/Queues.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class Queues extends React.Component {
queues: []
}

componentWillMount() {
componentDidMount() {
if (!this.props.url) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion webui/internal/assets/src/RetryJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class RetryJobs extends React.Component {
});
}

componentWillMount() {
componentDidMount() {
this.fetch();
}

Expand Down
2 changes: 1 addition & 1 deletion webui/internal/assets/src/ScheduledJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class ScheduledJobs extends React.Component {
});
}

componentWillMount() {
componentDidMount() {
this.fetch();
}

Expand Down
Loading

0 comments on commit 897f108

Please sign in to comment.