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 623c9fc commit dd7ae3a
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 15 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 -- --changed ${{ github.ref }}
- name: Run lint, type checks and tests
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm test -- --changed ${{ github.ref }}"
deploy-to-dev:
name: Deploy App 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,11 +23,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
- name: Run lint, type checks and tests
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm test"
pr-deploy-preview:
if: github.event.pull_request.base.ref == 'develop'
Expand Down
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --concurrent false
npm run check:types
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 @@ -47,6 +47,7 @@
"@vitest/coverage-c8": "^0.25.6",
"@vitest/ui": "^0.25.6",
"autoprefixer": "^10.4.13",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
"eslint": "^8.29.0",
Expand Down Expand Up @@ -98,4 +99,4 @@
"last 1 safari version"
]
}
}
}
67 changes: 65 additions & 2 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 dd7ae3a

Please sign in to comment.