Skip to content

Commit

Permalink
Chore(repo): Enable distributed caching of builds using Nx Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Oct 6, 2023
1 parent 3d83860 commit 5a2d06a
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- packages/web/**
- packages/web-react/**

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_BRANCH: ${{ github.event.number || github.ref_name }}
NX_VERBOSE_LOGGING: true

jobs:
build:
name: Building on node ${{ matrix.node-version }})
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
schedule:
- cron: '0 9 * * *' # every day at 9:00

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_BRANCH: ${{ github.event.number || github.ref_name }}
NX_VERBOSE_LOGGING: true

jobs:
test:
runs-on: ubuntu-20.04
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ packages/*/build
/test-results/
/playwright-report/
/playwright/.cache/

# Narwall Nx
# there can be set `NX_CLOUD_ACCESS_TOKEN` for connection to Nx Cloud
# this prevents accidentiall commit of this token to repository
nx-cloud.env
5 changes: 3 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["lint", "test", "types", "build"]
"cacheableOperations": ["lint", "test", "types", "build"],
"accessToken": "NGYxNTY3NTAtOWY5NC00MWVmLThiNWEtY2MwNjE4OWJjZTcxfHJlYWQ="
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@lmc-eu/conventional-changelog-lmc-github": "2.3.1",
"@lmc-eu/eslint-config-react": "2.0.1",
"@lmc-eu/prettier-config": "1.2.4",
"@nrwl/nx-cloud": "16.4.0",
"@omlet/cli": "1.0.1-beta.34",
"@playwright/test": "1.38.1",
"@rollup/plugin-babel": "6.0.3",
Expand Down Expand Up @@ -88,7 +89,7 @@
"lerna": "6.6.2",
"netlify-cli": "12.14.0",
"npm-run-all": "4.1.5",
"nx": "15.9.6",
"nx": "16.10.0",
"postcss": "8.4.28",
"prettier": "2.8.8",
"pretty-quick": "3.1.3",
Expand Down
Loading

0 comments on commit 5a2d06a

Please sign in to comment.