Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
169 changes: 0 additions & 169 deletions .github/workflows/app-cd.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/sync-dev.yml

This file was deleted.

110 changes: 25 additions & 85 deletions .github/workflows/tool-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,17 @@ name: tool-ci
on:
push:
branches:
- '**'
tags:
- ''
- main
pull_request:
branches:
- dev
jobs:
scan:
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Scan Code
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=dds-tool
test_on_windows_2019:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: windows-2019
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_windows_2022:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: windows-2022
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_macos_12:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: macos-12
test_python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-12, ubuntu-22.04]
steps:
- name: Checkout Code
uses: actions/checkout@v3
Expand All @@ -71,44 +21,34 @@ jobs:
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_ubuntu_2204:
if: github.repository_owner == 'IDEA-Research'
needs: [test_on_windows_2019, test_on_windows_2022, test_on_macos_12 ]
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
python-version: "3.10"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
- name: Upload Test Report
uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-22.04'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
flags: backend
test_frontend:
if: github.repository_owner == 'IDEA-Research'
runs-on: self-hosted
runs-on: ubuntu-22.04
env:
TZ: Asia/Shanghai
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with: {}
- name: Install requirements
run: pnpm install --frozen-lockfile
- name: Run pnpm audit
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ venv
.DS_Store
/config.py
.python-version
.venv-dds
.dds-home
.pypirc

# for runtime file
/data
Expand Down
2 changes: 1 addition & 1 deletion deepdataspace/server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</head>
<body>
<div id="root"></div>
<script src="/static/umi.c30875f2.js"></script>
<script src="/static/umi.daf451b9.js"></script>

</body></html>

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deepdataspace/server/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</head>
<body>
<div id="root"></div>
<script src="/static/umi.c30875f2.js"></script>
<script src="/static/umi.daf451b9.js"></script>

</body></html>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "deepdataspace",
"private": true,
"packageManager": "pnpm@8.15.9",
"scripts": {
"update:app": "chmod +x ./build_frontend.sh && ./build_frontend.sh",
"build:app": "pnpm run --filter app build",
Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export default () => {
setUser({ isLogin: false });
message.success(globalLocaleText('logoutSuccess'));
localStorage.removeItem(STORAGE_KEY.AUTH_TOKEN);
history.push('/');
// In unit tests (or non-umi runtime), `history` can be undefined.
history?.push?.('/');
} catch (error) {
console.error('error', error);
message.error(globalLocaleText('logoutFailed'));
Expand Down
4 changes: 2 additions & 2 deletions packages/app/tests/models/user.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ describe('useModel user', () => {
await result.current.checkLoginStatus();
expect(fetchUserInfo).toHaveBeenCalledTimes(1);
});
act(async () => {
result.current.limitLoginAction();
await act(async () => {
await result.current.limitLoginAction();
});
expect(result.current.user.isLogin).toEqual(true);
});
Expand Down
Loading
Loading