Skip to content

Commit

Permalink
ci: backend actions to run in proper directory
Browse files Browse the repository at this point in the history
  • Loading branch information
k1eu committed Aug 9, 2024
1 parent c2b7a43 commit 5b68407
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/pr-backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/api/

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -27,7 +25,7 @@ jobs:
run: pnpm install

- name: Run ESLint
run: pnpm lint-tsc
run: pnpm lint-tsc --filter=api

build:
name: Build app
Expand All @@ -51,9 +49,7 @@ jobs:
test:
name: Jest tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/api/

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -70,7 +66,7 @@ jobs:
run: pnpm install

- name: Run unit tests
run: pnpm test
run: pnpm test --filter=api

- name: Run e2e tests
run: pnpm test:e2e
run: pnpm test:e2e --filter=api
5 changes: 3 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/src/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint-tsc": "tsc --noEmit && eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint-tsc": "tsc --noEmit && eslint \"{src,apps,libs,test}/**/*.ts\"",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
Expand Down

0 comments on commit 5b68407

Please sign in to comment.