Skip to content

Commit

Permalink
chore: upgrade workflows (#11356)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Oct 9, 2024
1 parent e48e314 commit 0946731
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 40 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
4 changes: 2 additions & 2 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
yarn build
- name: upload dist artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Upload PR number
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: pr
path: ./pr-id.txt
6 changes: 3 additions & 3 deletions .github/workflows/preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
- name: download pr artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v4
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: pr
Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "::set-output name=id::$(<pr-id.txt)"

- name: download dist artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v4
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
steps:
- name: download pr artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v4
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: pr
Expand Down
8 changes: 1 addition & 7 deletions .husky/commit-msg
100755 β†’ 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Export Git hook params
export GIT_PARAMS=$*

npx --no-install fabric verify-commit
npx --no -- commitlint --edit $1
5 changes: 1 addition & 4 deletions .husky/pre-commit
100755 β†’ 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": "prettier --ignore-unknown --write"
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
"lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto",
"openapi": "max openapi",
"prepare": "husky install",
"prepare": "husky",
"prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\"",
"preview": "npm run build && max preview --port 8000",
"record": "cross-env NODE_ENV=development REACT_APP_ENV=test max record --scene=login",
Expand All @@ -42,9 +42,7 @@
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
"defaults"
],
"dependencies": {
"@ant-design/icons": "^4.8.3",
Expand All @@ -60,6 +58,8 @@
},
"devDependencies": {
"@ant-design/pro-cli": "^3.3.0",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@testing-library/react": "^16.0.1",
"@types/classnames": "^2.3.1",
"@types/express": "^4.17.21",
Expand All @@ -76,12 +76,12 @@
"eslint": "^8.57.0",
"express": "^4.19.2",
"gh-pages": "^3.2.3",
"husky": "^7.0.4",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^10.5.4",
"lint-staged": "^15.2.10",
"mockjs": "^1.1.0",
"prettier": "^2.8.8",
"prettier": "^3.3.3",
"react-dev-inspector": "^1.9.0",
"swagger-ui-dist": "^4.19.1",
"ts-node": "^10.9.2",
Expand Down
34 changes: 17 additions & 17 deletions src/pages/User/Login/__snapshots__/login.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -610,41 +610,41 @@ exports[`Login Page should show login form 1`] = `
style="flex: 1; padding: 32px 0px;"
>
<div
class="ant-pro-form-login-container css-dev-only-do-not-override-11lehqq css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-container css-dev-only-do-not-override-ccdg5a css-dev-only-do-not-override-ccdg5a"
>
<div
class="ant-pro-form-login-top css-dev-only-do-not-override-11lehqq css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-top css-dev-only-do-not-override-ccdg5a css-dev-only-do-not-override-ccdg5a"
>
<div
class="ant-pro-form-login-header css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-header css-dev-only-do-not-override-ccdg5a"
>
<span
class="ant-pro-form-login-logo css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-logo css-dev-only-do-not-override-ccdg5a"
>
<img
alt="logo"
src="/logo.svg"
/>
</span>
<span
class="ant-pro-form-login-title css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-title css-dev-only-do-not-override-ccdg5a"
>
Ant Design
</span>
</div>
<div
class="ant-pro-form-login-desc css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-desc css-dev-only-do-not-override-ccdg5a"
>
Ant Design is the most influential web design specification in Xihu district
</div>
</div>
<div
class="ant-pro-form-login-main css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-main css-dev-only-do-not-override-ccdg5a"
style="width: 328px; min-width: 280px; max-width: 75vw;"
>
<form
autocomplete="off"
class="ant-form ant-form-vertical ant-pro-form css-dev-only-do-not-override-11lehqq"
class="ant-form ant-form-vertical ant-pro-form css-dev-only-do-not-override-ccdg5a"
>
<input
style="display: none;"
Expand Down Expand Up @@ -947,7 +947,7 @@ exports[`Login Page should show login form 1`] = `
</a>
</div>
<button
class="ant-btn ant-btn-primary ant-btn-lg"
class="ant-btn ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-lg"
style="width: 100%;"
type="button"
>
Expand All @@ -957,7 +957,7 @@ exports[`Login Page should show login form 1`] = `
</button>
</form>
<div
class="ant-pro-form-login-main-other css-dev-only-do-not-override-11lehqq"
class="ant-pro-form-login-main-other css-dev-only-do-not-override-ccdg5a"
>
Login with :
<span
Expand Down Expand Up @@ -1023,17 +1023,17 @@ exports[`Login Page should show login form 1`] = `
</div>
</div>
<footer
class="ant-layout-footer css-dev-only-do-not-override-11lehqq"
class="ant-layout-footer css-dev-only-do-not-override-ccdg5a"
style="padding: 0px; background: none;"
>
<div
class="ant-pro-global-footer css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer css-dev-only-do-not-override-ccdg5a"
>
<div
class="ant-pro-global-footer-list css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer-list css-dev-only-do-not-override-ccdg5a"
>
<a
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-ccdg5a"
href="https://pro.ant.design"
rel="noreferrer"
target="_blank"
Expand All @@ -1042,7 +1042,7 @@ exports[`Login Page should show login form 1`] = `
Ant Design Pro
</a>
<a
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-ccdg5a"
href="https://github.com/ant-design/ant-design-pro"
rel="noreferrer"
target="_blank"
Expand All @@ -1069,7 +1069,7 @@ exports[`Login Page should show login form 1`] = `
</span>
</a>
<a
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer-list-link css-dev-only-do-not-override-ccdg5a"
href="https://ant.design"
rel="noreferrer"
target="_blank"
Expand All @@ -1079,7 +1079,7 @@ exports[`Login Page should show login form 1`] = `
</a>
</div>
<div
class="ant-pro-global-footer-copyright css-dev-only-do-not-override-11lehqq"
class="ant-pro-global-footer-copyright css-dev-only-do-not-override-ccdg5a"
>
<span
aria-label="copyright"
Expand Down

0 comments on commit 0946731

Please sign in to comment.