Skip to content

Commit

Permalink
chore: use pnpm in check-code
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Oct 27, 2023
1 parent c866698 commit 1e2d60d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "yarn"
cache-dependency-path: core/api/yarn.lock
- run: cd core/api && yarn install --frozen-lockfile
- run: cd core/api && nix develop -c pnpm install
- name: Run check code
run: cd core/api && make check-code
run: cd core/api && nix develop -c make check-code
12 changes: 6 additions & 6 deletions core/api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ check-implicit:
yarn tsc-check-noimplicitany

check-code: check-implicit
yarn tsc-check
yarn eslint-check
yarn build
yarn check:sdl
yarn check-yaml
yarn madge-check
pnpm run tsc-check
pnpm run eslint-check
pnpm run build
pnpm run check:sdl
pnpm run check-yaml
pnpm run madge-check

create-tmp-env-ci:
. ./.env && \
Expand Down
4 changes: 2 additions & 2 deletions core/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"eslint-fix": "eslint src test --ext .ts --fix",
"build": "tsc -p tsconfig-build.json && cp -R src/services/price/protos dist/services/price/ && cp -R src/services/dealer-price/proto dist/services/dealer-price/ && cp -R src/services/loopd/protos dist/services/loopd/ && cp -R src/services/bria/proto dist/services/bria/ && tscpaths --silent -p tsconfig.json -s ./src -o ./dist",
"trigger": "yarn build && node dist/servers/trigger.js | pino-pretty -c -l",
"check:sdl": ". ../../.env && yarn write-sdl && if git diff --name-only | grep -q 'core/api/src/graphql/admin/schema.graphql'; then echo 'Error: core/api/src/graphql/admin/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi && if git diff --name-only | grep -q 'core/api/src/graphql/public/schema.graphql'; then echo 'Error: core/api/src/graphql/public/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi",
"write-sdl": "yarn build && node dist/servers/write-sdl.js write-sdl.yaml && rover supergraph compose --config dev/apollo-federation/supergraph-config.yaml --elv2-license accept > dev/apollo-federation/supergraph.graphql",
"check:sdl": ". ../../.env && pnpm run write-sdl && if git diff --name-only | grep -q 'core/api/src/graphql/admin/schema.graphql'; then echo 'Error: core/api/src/graphql/admin/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi && if git diff --name-only | grep -q 'core/api/src/graphql/public/schema.graphql'; then echo 'Error: core/api/src/graphql/public/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi",
"write-sdl": "pnpm run build && node dist/servers/write-sdl.js write-sdl.yaml && rover supergraph compose --config dev/apollo-federation/supergraph-config.yaml --elv2-license accept > dev/apollo-federation/supergraph.graphql",
"ws": "yarn build && node dist/servers/ws-server.js | pino-pretty -c -l",
"watch": "nodemon -V -e ts,graphql -w ./src -x yarn run start",
"watch-trigger": "nodemon -V -e ts,graphql -w ./src -x yarn trigger",
Expand Down

0 comments on commit 1e2d60d

Please sign in to comment.