Skip to content

Commit

Permalink
ci: Workflow Bot -- Update ALL Dependencies (main) (#6330)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason3S <3740137+Jason3S@users.noreply.github.com>
Co-authored-by: Jason Dent <jason@streetsidesoftware.nl>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent cad5d8c commit f1ba0a6
Show file tree
Hide file tree
Showing 23 changed files with 330 additions and 283 deletions.
12 changes: 6 additions & 6 deletions .github/actions/build-for-integrations/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ outputs:
Return values:
- 'true' - the cache was used.
- '' - the cache was not used.
value: ${{ steps.step-cache-build.outputs.cache-hit }}
value: ${{ steps.step-cache-build.outputs.cache-hit == 'true' || '' }}

runs:
using: 'composite'
Expand Down Expand Up @@ -65,7 +65,7 @@ runs:

- name: Cache Build
id: step-cache-build
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: ${{ steps.cache-key.outputs.value }}
path: ${{ steps.cache-path.outputs.value }}
Expand All @@ -77,13 +77,13 @@ runs:
Build Cache: ${{ steps.step-cache-build.outputs.cache-hit && 'Hit' || 'Miss' }}
- name: Setup Env
if: ${{ !steps.step-cache-build.outputs.cache-hit && inputs.use-setup }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' && inputs.use-setup }}
uses: ./.github/actions/setup
with:
node-version: ${{ inputs.node-version }}

- name: Pnpm CI
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm i
shell: bash

Expand All @@ -95,12 +95,12 @@ runs:
shell: bash

- name: Clean
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm run clean
shell: bash

- name: Build
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm run build
shell: bash

Expand Down
16 changes: 8 additions & 8 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ outputs:
Return values:
- 'true' - the cache was used.
- '' - the cache was not used.
value: ${{ steps.step-cache-build.outputs.cache-hit }}
value: ${{ steps.step-cache-build.outputs.cache-hit == 'true' || '' }}

runs:
using: 'composite'
Expand Down Expand Up @@ -81,7 +81,7 @@ runs:

- name: Cache Build
id: step-cache-build
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: ${{ steps.cache-key.outputs.value }}
path: ${{ steps.cache-path.outputs.value }}
Expand All @@ -90,16 +90,16 @@ runs:
uses: ./.github/actions/echo
with:
value: >-
Build Cache: ${{ steps.step-cache-build.outputs.cache-hit && 'Hit' || 'Miss' }}
Build Cache: ${{ steps.step-cache-build.outputs.cache-hit == 'true' && 'Hit' || 'Miss' }}
- name: Setup Env
if: ${{ !steps.step-cache-build.outputs.cache-hit && inputs.use-setup }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' && inputs.use-setup }}
uses: ./.github/actions/setup
with:
node-version: ${{ inputs.node-version }}

- name: Pnpm CI
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm i
shell: bash

Expand All @@ -111,12 +111,12 @@ runs:
shell: bash

- name: Clean
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm run clean
shell: bash

- name: Build
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: pnpm run build
shell: bash

Expand All @@ -131,4 +131,4 @@ runs:
```
${{ steps.cache-path.outputs.value }}
```
- hit: ${{ steps.step-cache-build.outputs.cache-hit || 'Miss' }}
- hit: ${{ steps.step-cache-build.outputs.cache-hit == 'true' && 'true' || 'Miss' }}
2 changes: 1 addition & 1 deletion .github/actions/smoke-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
shell: bash

- name: Restore CSpell cache
uses: actions/cache@v4
uses: actions/cache@v4.0.2
if: ${{ inputs.use_cspell_cache == 'true' }}
with:
key: cspell-cache-${{ runner.os }}-smoke-test-${{ hashFiles('**/*.ts', '**/*.md') }}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/clean-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
2 changes: 1 addition & 1 deletion .github/workflows/cspell-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- run: pnpm --filter @cspell/cspell-types --filter @cspell/cspell-bundled-dicts run build

- name: Restore CSpell cache
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: cspell-cache-v2-${{ runner.os }}-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- name: Cache Integration Run
id: step-cache-run
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: integration-run--${{ env.REF_BRANCH }}-${{ steps.repo-hash.outputs.value }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}-1
# Store the patch files to update the integration perf data
Expand All @@ -186,34 +186,34 @@ jobs:
- uses: ./.github/actions/echo
with:
value: |
Run Cache: ${{ steps.step-cache-run.outputs.cache-hit && 'Hit' || 'Miss' }}
Run Cache: ${{ steps.step-cache-run.outputs == 'true' && 'Hit' || 'Miss' }}
- name: Setup Env
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- id: step-cache-build
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
uses: ./.github/actions/build-for-integrations

- uses: ./.github/actions/echo
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
with:
value: |
Run Cache: ${{ steps.step-cache-run.outputs.cache-hit && 'Hit' || 'Miss' }}
Run Cache: ${{ steps.step-cache-run.outputs.cache-hit == 'true' && 'Hit' || 'Miss' }}
- name: Cache Integration Test Repository Files
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
uses: actions/cache@v4
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
uses: actions/cache@v4.0.2
with:
key: int-repo-temp-files-${{ matrix.repo }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}
path: |
integration-tests/repositories/temp/${{ matrix.repo }}
- name: Run Integration Tests ${{ matrix.repo }}
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
Expand All @@ -222,7 +222,7 @@ jobs:
&& pnpm run integration-tests -- ${{ matrix.repo }}
- name: store perf run
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
if: ${{ steps.step-cache-run.outputs.cache-hit != 'true' }}
uses: actions/upload-artifact@v4
with:
name: perf-repo-${{ steps.step-normalize-repo-name.outputs.REPO_NAME }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-dictionaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ jobs:

- name: Cache Build
id: step-cache-build
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: ${{ needs.build.outputs.key }}
path: ${{ needs.build.outputs.path }}

- name: Cached Results
run: |
echo Build Cache: ${{ steps.step-cache-build.outputs.cache-hit && 'Hit' || 'Miss' }}
echo Build Cache: ${{ steps.step-cache-build.outputs.cache-hit == 'true' && 'Hit' || 'Miss' }}
- name: Install
run: pnpm i
Expand All @@ -190,7 +190,7 @@ jobs:
cat /home/runner/.pnpm/_logs/*.log
- name: Check Build
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: exit 1

- name: Repo Info
Expand All @@ -199,7 +199,7 @@ jobs:
echo "repo-info=$(jq -c '.repositories[] | select(.path == "${{ matrix.repo }}")' integration-tests/config/config.json)" >> $GITHUB_OUTPUT
- name: Cache Integration Test Repository Files
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: int-repo-temp-files-${{ matrix.repo }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-integration-repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ jobs:

- name: Cache Build
id: step-cache-build
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
key: ${{ needs.build.outputs.key }}
path: ${{ needs.build.outputs.path }}

- name: Cached Results
run: |
echo Build Cache: ${{ steps.step-cache-build.outputs.cache-hit && 'Hit' || 'Miss' }}
echo Build Cache: ${{ steps.step-cache-build.outputs.cache-hit == 'true' && 'Hit' || 'Miss' }}
- name: pnpm CI
run: pnpm i
Expand All @@ -110,7 +110,7 @@ jobs:
cat /home/runner/.pnpm/_logs/*.log
- name: Check Build
if: ${{ !steps.step-cache-build.outputs.cache-hit }}
if: ${{ steps.step-cache-build.outputs.cache-hit != 'true' }}
run: exit 1

- name: Run Integration Tests ${{ matrix.repo }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@rollup/plugin-typescript": "^12.1.0",
"@swc-node/register": "^1.10.9",
"@tsconfig/node18": "^18.2.4",
"@types/node": "^18.19.54",
"@types/node": "^18.19.55",
"@vitest/coverage-istanbul": "^2.1.2",
"conventional-changelog-conventionalcommits": "^8.0.0",
"eslint": "^9.12.0",
Expand All @@ -126,7 +126,7 @@
"ts2mjs": "^3.0.0",
"tslib": "^2.7.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.8.0",
"typescript-eslint": "^8.8.1",
"vite": "^5.4.8",
"vitest": "^2.1.2"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/cspell-eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
"@internal/fixture-test-dictionary": "workspace:*",
"@types/eslint": "^8.56.12",
"@types/estree": "^1.0.6",
"@types/mocha": "^10.0.8",
"@typescript-eslint/parser": "^8.8.0",
"@typescript-eslint/types": "^8.8.0",
"@types/mocha": "^10.0.9",
"@typescript-eslint/parser": "^8.8.1",
"@typescript-eslint/types": "^8.8.1",
"eslint": "^9.12.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-mdx": "^3.1.5",
Expand All @@ -98,7 +98,7 @@
"mocha": "^10.7.3",
"ts-json-schema-generator": "^2.3.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.8.0",
"typescript-eslint": "^8.8.1",
"yaml-eslint-parser": "^1.2.3"
},
"dependencies": {
Expand Down
42 changes: 21 additions & 21 deletions packages/cspell-lib/api/api.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cspell-lib/src/lib/Document/Document.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Uri } from '../util/Uri.js';
import type { Uri } from '../util/IUri.js';

export interface Document {
uri: UriString;
Expand Down
2 changes: 1 addition & 1 deletion packages/cspell-lib/src/lib/Document/isBinaryDoc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getLanguagesForBasename, isGenerated } from '../fileTypes.js';
import type { Uri } from '../util/Uri.js';
import type { Uri } from '../util/IUri.js';
import { basename, toUri } from '../util/Uri.js';
import type { Document } from './Document.js';
import { normalizeLanguageIds } from './normalizeLanguageIds.js';
Expand Down
Loading

0 comments on commit f1ba0a6

Please sign in to comment.