Skip to content

Commit

Permalink
Merge pull request #34 from Himenon/fix-test
Browse files Browse the repository at this point in the history
ci: fix github action checkout settings
  • Loading branch information
Himenon authored Feb 6, 2020
2 parents 17dd511 + b654eb3 commit d7d0deb
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 54 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pull-request-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [12.x]

steps:
- uses: actions/checkout@v2
with:
ref: master
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand All @@ -23,6 +23,6 @@ jobs:
run: |
yarn install --frozen-lockfile
yarn build
yarn test
yarn test:ci
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/push-master-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [12.x]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
ref: master
- uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- run: |
yarn install --frozen-lockfile
yarn test
yarn test:ci
yarn build
# release-github-npm-registry:
Expand Down
18 changes: 0 additions & 18 deletions jest.config.json

This file was deleted.

8 changes: 2 additions & 6 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
"publish": {
"access": "public",
"allowBranch": "master",
"ignoreChanges": [
"CHANGELOG.md"
]
"ignoreChanges": ["CHANGELOG.md"]
}
},
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"version": "0.3.7",
"npmClient": "yarn",
"registry": "https://registry.npmjs.org/",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"lint": "eslint -c ./.eslintrc.js 'packages/**/*.{ts,tsx}'",
"lint:fix": "yarn lint --fix",
"test": "lerna run test",
"test:ci": "lerna run test:ci",
"version_up": "lerna version --yes"
},
"husky": {
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"server": "nodemon ./bin/code-dependency.js --source ./src --exclude node_modules",
"start": "run-p develop server",
"test": "jest -c jest.config.json && yarn export:static",
"test:ci": "jest -c jest.config.json --no-cache --ci && yarn export:static",
"test:depcruise": "depcruise --validate .dependency-cruiser.json src",
"ts": "ts-node -P tsconfig.json"
},
Expand Down
7 changes: 2 additions & 5 deletions packages/view/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
}
},
"moduleNameMapper": {
"^@this/domain(.*)": "<rootDir>/src/domain$1",
"^@this/container-component(.*)": "<rootDir>/src/container-component$1",
"^@this/view-component(.*)": "<rootDir>/src/view-component$1",
"^@this/infra(.*)": "<rootDir>/src/infra$1"
"@app/(.+)": "<rootDir>/src/$1"
},
"moduleDirectories": ["node_modules"],
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "node"],
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"],
"testMatch": ["**/__tests__/*.test.+(ts|tsx)"],
"collectCoverage": true,
"transform": {
Expand Down
3 changes: 2 additions & 1 deletion packages/view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"develop": "cross-env-shell NODE_ENV=development yarn ts ./scripts/develop.ts",
"serve": "serve dist",
"start": "yarn develop",
"test": "jest -c jest.config.json",
"test": "jest -c jest.config.json --no-cache",
"test:ci": "jest -c jest.config.json --no-cache --ci",
"ts": "ts-node -P ./scripts/tsconfig.cli.json"
},
"dependencies": {
Expand Down
9 changes: 1 addition & 8 deletions packages/view/scripts/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,7 @@ export const generateConfig = ({ isProduction, isLibrary, ...option }: Option):
resolve: {
extensions: [".js", ".ts", ".tsx", ".scss", ".json"],
alias: {
"@app/component": appPath("./src/component/index.ts"),
"@app/container": appPath("./src/container/index.ts"),
"@app/domain": appPath("./src/domain/index.ts"),
"@app/infra": appPath("./src/infra/index.ts"),
"@app/router": appPath("./src/router/index.tsx"),
"@app/interface": appPath("./src/interface/index.ts"),
"@app/style": appPath("./src/style/index.ts"),
"@app/api": appPath("./src/api/index.ts"),
"@app": appPath("./src"),
React: appPath("../../node_modules/react"),
ReactDOM: appPath("../../node_modules/react-dom"),
},
Expand Down
30 changes: 20 additions & 10 deletions packages/view/src/container/FileTree/__tests__/Store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,59 +23,69 @@ const filePathObjectList: FilePathObject[] = [
const directoryResult: SideNavItem.Props[] = [
{
id: ".",
isDefaultOpen: true,
name: "@code-dependency",
to: "",
to: "@code-dependency",
items: [
{
id: ".",
isDefaultOpen: true,
name: ".",
to: "",
to: ".",
items: [
{
id: "./a",
isDefaultOpen: false,
name: "a",
to: "",
to: "a",
items: [
{
id: "./a/b",
isDefaultOpen: false,
name: "b",
to: "",
to: "b",
items: [
{
id: "./a/b/c",
isDefaultOpen: false,
name: "c",
to: "",
to: "c",
items: [
{
id: "./a/b/c/index.ts",
isDefaultOpen: false,
name: "index.ts",
to: "",
to: "/project?pathname=.%2Fa%2Fb%2Fc%2Findex.ts",
},
],
},
{
id: "./a/b/index.ts",
isDefaultOpen: false,
name: "index.ts",
to: "",
to: "/project?pathname=.%2Fa%2Fb%2Findex.ts",
},
],
},
{
id: "./a/index.ts",
isDefaultOpen: false,
name: "index.ts",
to: "",
to: "/project?pathname=.%2Fa%2Findex.ts",
},
],
},
{
id: "./app.ts",
isDefaultOpen: false,
name: "app.ts",
to: "",
to: "/project?pathname=.%2Fapp.ts",
},
{
id: "./index.ts",
isDefaultOpen: false,
name: "index.ts",
to: "",
to: "/project?pathname=.%2Findex.ts",
},
],
},
Expand Down

0 comments on commit d7d0deb

Please sign in to comment.