Skip to content

Commit

Permalink
ci: Use cspell cache (#2389)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Feb 3, 2022
1 parent 297038d commit cbfe8d8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/coverage.yml
Expand Up @@ -34,6 +34,16 @@ jobs:
- run: npm i -g npm@8
- run: npm -v

- name: Restore CSpell cache
uses: actions/cache@v2
with:
key: cspell-cache-v2-${{ runner.os }}-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
.cspellcache
.cspell/.cspellcache
restore-keys: |
cspell-cache-v2-${{ runner.os }}-
- run: npm ci
- run: npm run build
- run: npm run coverage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cspell-cli.yml
Expand Up @@ -30,6 +30,7 @@ jobs:
key: cspell-cache-v2-${{ runner.os }}-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
.cspellcache
.cspell/.cspellcache
restore-keys: |
cspell-cache-v2-${{ runner.os }}-
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Expand Up @@ -18,6 +18,17 @@ jobs:
uses: actions/setup-node@v2.5.1
with:
cache: npm

- name: Restore CSpell cache
uses: actions/cache@v2
with:
key: cspell-cache-v2-${{ runner.os }}-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
.cspellcache
.cspell/.cspellcache
restore-keys: |
cspell-cache-v2-${{ runner.os }}-
- run: npm ci
- run: npm run build
- run: npm run lint-ci
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -44,6 +44,17 @@ jobs:
integration-tests/package-lock.json
- run: npm i -g npm@8
- run: npm -v

- name: Restore CSpell cache
uses: actions/cache@v2
with:
key: cspell-cache-v2-${{ runner.os }}-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
.cspellcache
.cspell/.cspellcache
restore-keys: |
cspell-cache-v2-${{ runner.os }}-
- run: npm ci
- run: npm run build
- run: npm test
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -44,8 +44,8 @@
"test-bin": "npm run test-bin-spell && npm run test-bin-spell-cache-content && npm run test-bin-spell-cache-metadata && npm run test-bin-trace && npm run test-bin-check",
"test-bin-check": "node ./bin.js check README.md",
"test-bin-spell": "node ./bin.js -c cspellrc.json --no-progress",
"test-bin-spell-cache-content": "node ./bin.js -c cspellrc.json --cache --cache-strategy content",
"test-bin-spell-cache-metadata": "node ./bin.js -c cspellrc.json --cache --cache-strategy metadata",
"test-bin-spell-cache-content": "node ./bin.js -c cspellrc.json --cache --cache-strategy content --cache-location temp/.cspellcache-content",
"test-bin-spell-cache-metadata": "node ./bin.js -c cspellrc.json --cache --cache-strategy metadata temp/.cspellcache-meta",
"test-bin-trace": "node ./bin.js trace test",
"test-build-docs": "lerna run test-build-docs",
"test-integrations": "cd ./integration-tests && npm run integration-tests",
Expand Down

0 comments on commit cbfe8d8

Please sign in to comment.