Skip to content

Commit

Permalink
Readd hoist, bootstrap cache. Set eslint to use content instead of me…
Browse files Browse the repository at this point in the history
…tadata
  • Loading branch information
mattrunyon committed Apr 29, 2021
1 parent 90d1c21 commit 4929ee6
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 5 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
# If no package-locks or the main package.json have changed, it should be safe to restore all node_modules as they were
# Changing the main package.json may change the postinstall scripts, so it should be unchanged to cache install results
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json', 'package.json') }}

- name: Cache npm cache
uses: actions/cache@v2
env:
Expand All @@ -39,16 +48,20 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache eslint cache
- name: Cache linter caches
uses: actions/cache@v2
with:
path: '**/.eslintcache'
key: ${{ runner.os }}-eslintcache-${{ github.head_ref }}
path: |
'**/.eslintcache'
'**/.stylelintcache'
key: ${{ runner.os }}-lintcache-${{ github.head_ref }}
restore-keys: |
${{ runner.os }}-eslintcache-
${{ runner.os }}-lintcache-
${{ runner.os }}-
# Only need to install and bootstrap deps if package-locks changed
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Test
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"clean:build": "lerna run clean --stream",
"clean:modules": "lerna clean --yes",
"clean": "npm run clean:build && npm run clean:modules",
"bootstrap": "lerna bootstrap",
"bootstrap": "lerna bootstrap --hoist -- --no-audit --prefer-offline",
"build": "lerna run build --stream",
"build:app": "lerna run --scope=@deephaven/code-studio build",
"build:packages": "lerna run --ignore=@deephaven/code-studio build --stream",
Expand Down
1 change: 1 addition & 0 deletions packages/code-studio/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down
1 change: 1 addition & 0 deletions packages/jsapi-shim/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down
1 change: 1 addition & 0 deletions packages/log/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down
1 change: 1 addition & 0 deletions packages/react-hooks/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/test/eslint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ it('eslint', async () => {
const eslint = new ESLint({
extensions: ['js', 'jsx', 'ts', 'tsx'],
cache: true,
cacheStrategy: 'content',
});
const results = await eslint.lintFiles('./src');
const formatter = await eslint.loadFormatter();
Expand Down

0 comments on commit 4929ee6

Please sign in to comment.