Skip to content

Commit

Permalink
CI: build-local script to ensure proper linkage of deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Gum-Joe committed Aug 4, 2024
1 parent fef1636 commit 7a2eaf0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 35 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
name: CI

on:
push:
branches:
- main
pull_request:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0



# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"


# Cache node_modules
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'

- run: npm ci
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
- run: npx nx affected -t lint test build
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"

# Cache node_modules
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"

- run: npm ci
- uses: nrwl/nx-set-shas@v4

# Build util

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
- run: npx nx affected -t lint test build build-local
3 changes: 2 additions & 1 deletion common/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"winston": "^3.13.1"
},
"scripts": {
"build": "tsc --build --verbose"
"build": "tsc --build --verbose",
"build-local": "tsc --build --verbose"
},
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
3 changes: 2 additions & 1 deletion email/libmailmerge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"scripts": {
"start": "ts-node src/cli.ts",
"test": "jest",
"build": "tsc --build --verbose"
"build": "tsc --build --verbose",
"build-local": "tsc --build --verbose"
},
"bin": "./dist/cli.js",
"type": "commonjs",
Expand Down
3 changes: 2 additions & 1 deletion email/mailmerge-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"ts-node": "^10.9.2"
},
"scripts": {
"build": "tsc --build --verbose"
"build": "tsc --build --verbose",
"build-local": "tsc --build --verbose"
},
"type": "commonjs",
"main": "./dist/index.js",
Expand Down

0 comments on commit 7a2eaf0

Please sign in to comment.