Skip to content

Commit

Permalink
feat: run test scripts concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
emnnipal committed Dec 22, 2022
1 parent e5d30e4 commit 8c916ba
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Run lint and type checks
run: pnpm lint & pnpm check:types & wait -n

- name: Run tests
run: pnpm test -- --maxWorkers=4 --no-color --coverage=false --changedSince=origin/main
- name: Run lint, type checks and tests
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm test -- --maxWorkers=4 --no-color --coverage=false --changedSince=origin/main"
deploy-to-dev:
name: Deploy to Dev
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Run lint and type checks
run: pnpm lint & pnpm check:types & wait -n

- name: Run tests
run: pnpm test -- --maxWorkers=4 --no-color --coverage=false --changedSince=origin/main
- name: Run lint, type checks and tests
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm test -- --maxWorkers=4 --no-color --coverage=false --changedSince=origin/main"
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --concurrent false
npx concurrently -g \
"npx lint-staged --concurrent false" \
"npm run check:types"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3",
"eslint": "^8.26.0",
"eslint-config-airbnb-base": "^15.0.0",
Expand Down Expand Up @@ -88,4 +89,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}
31 changes: 31 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c916ba

Please sign in to comment.