Skip to content

Commit

Permalink
chore: separate unit testing and linting (#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman authored May 2, 2024
1 parent df5cd30 commit 7d12be2
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 14 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable --network-timeout 1000000
- run: yarn test
- name: unit tests
run: yarn test
- name: linting
run: yarn lint

integration:
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"scripts": {
"build": "lerna run prepack --concurrency 4",
"test": "lerna run test --concurrency 4",
"lint": "lerna run lint --concurrency 4",
"version": "cp packages/cli/CHANGELOG.md CHANGELOG.md && git add CHANGELOG.md",
"cleanNodeModules": "rm -rf ./packages/*/node_modules && rm -rf ./node_modules && rm -rf ./.yarn/cache"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/addons-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"posttest": "yarn lint",
"prepack": "oclif manifest",
"release": "np",
"test": "mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/apps-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc --extension .js mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "nyc --extension .js mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/certs-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/ci-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc mocha --forbid-only && yarn lint",
"test": "nyc mocha --forbid-only",
"version": "oclif readme && git add README.md"
}
}
3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,12 @@
"build": "rm -rf lib && tsc",
"lint": "eslint . --ext .ts --config ../../.eslintrc --ignore-path ../../.eslintignore-lib",
"postpublish": "rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "yarn run build && oclif manifest",
"pretest": "tsc -p test --noEmit && cd ../.. && yarn build",
"test:acceptance": "yarn pretest && mocha --forbid-only \"test/**/*.acceptance.test.ts\" && node ./bin/bats-test-runner",
"test:integration": "yarn pretest && mocha --forbid-only \"test/**/*.integration.test.ts\"",
"test:smoke": "yarn pretest && mocha --forbid-only \"test/**/smoke.acceptance.test.ts\"",
"test": "yarn pretest && nyc mocha --forbid-only \"test/**/*.unit.test.ts\" && yarn posttest",
"test": "yarn pretest && nyc mocha --forbid-only \"test/**/*.unit.test.ts\"",
"version": "oclif readme --multi && git add README.md ../../docs"
},
"types": "lib/index.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/container-registry-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "cross-env TZ=utc nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "cross-env TZ=utc nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
},
"topic": "container"
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "cross-env TZ=UTC nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "cross-env TZ=UTC nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/orgs-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc mocha ./test/**/*.unit.test.js && yarn lint",
"test": "nyc mocha ./test/**/*.unit.test.js",
"test:integration": "mocha './test/**/*.integration.test.js'",
"version": "oclif readme && git add README.md"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pg-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"release": "np",
"test": "cross-env TZ=utc nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "cross-env TZ=utc nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/redis-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/run-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpack": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc --extension .js mocha \"test/**/*.unit.test.js\" && yarn lint",
"test": "nyc --extension .js mocha \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}
2 changes: 1 addition & 1 deletion packages/spaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"lint": "eslint . --ext .js --config ../../.eslintrc --ignore-path ../../.eslintignore",
"postpublish": "rm oclif.manifest.json",
"prepack": "oclif manifest",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\" && yarn lint",
"test": "nyc mocha --forbid-only \"test/**/*.unit.test.js\"",
"version": "oclif readme && git add README.md"
}
}

0 comments on commit 7d12be2

Please sign in to comment.