diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 18c0224..aa6e2c5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -18,24 +18,18 @@ jobs: with: fetch-depth: 0 - - uses: KengoTODA/actions-setup-docker-compose@v1 - with: - version: '2.29.1' - # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - run: docker-compose up -d - # Cache node_modules - uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' - - run: npm ci --legacy-peer-deps && (cd apps/api-gateway; npm ci) && (cd apps/api-gateway/lambda/local-proxy; npm ci) + - run: npm i --legacy-peer-deps && (cd apps/api-gateway; npm i) && (cd apps/api-gateway/lambda/local-proxy; npm i) - uses: nrwl/nx-set-shas@v4 @@ -45,4 +39,10 @@ jobs: # NX_CLOUD_DISTRIBUTED_EXECUTION=false from this command. - run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx affected -t lint build + - uses: KengoTODA/actions-setup-docker-compose@v1 + with: + version: '2.29.1' + + - run: docker-compose up -d + - run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t test --coverage --passWithNoTests diff --git a/README.md b/README.md index 9a9d6b7..d8c115b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Repository for the Microservices API backend of the TerraMatch service TBD. The ApiGateway has been tested to be at least functional on AWS. Tooling around deployment will be handled in a future ticket. + # Database work For now, Laravel is the source of truth for all things related to the DB schema. As such, TypeORM is not allowed to modify the schema, and is expected to interface with exactly the schema that is managed by Laravel. This note is included in user.entity.ts, diff --git a/apps/api-gateway/package.json b/apps/api-gateway/package.json index 0e6987f..4b376b8 100644 --- a/apps/api-gateway/package.json +++ b/apps/api-gateway/package.json @@ -6,7 +6,7 @@ }, "scripts": { "build-local-proxy": "(cd lambda/local-proxy; npm run build)", - "synth-local": "cdk synth --no-staging --quiet", + "synth-local": "npx cdk synth --no-staging --quiet", "build": "npm run build-local-proxy && npm run synth-local", "serve": "DOCKER_HOST=unix://$HOME/.docker/run/docker.sock sam local start-api -t ./cdk.out/ApiGatewayStack.template.json -p 4000" },