Skip to content

Commit

Permalink
CI: Cache VSCode installation and Poky & Docs fetch
Browse files Browse the repository at this point in the history
This should speed up the build by caching the bigger resources we
download outside of NodeJS.
  • Loading branch information
deribaucourt committed May 30, 2024
1 parent 4518053 commit 447a87d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,17 @@ jobs:
- name: Install apt dependencies
run: sudo apt install chrpath diffstat

- name: Fetch Dependencies
- name: Cache fetch Poky & Docs
id: cache-poky
uses: actions/cache@v4
with:
path: |
server/resources/docs/
~/.vscode-test/extensions
key: cache-${{ hashFiles('scripts/fetch-poky.sh', 'scripts/fetch-docs.sh') }}

- name: Fetch Poky & Docs
if: steps.cache-poky.outputs.cache-hit != 'true'
run: npm run fetch

- name: Run Linter
Expand All @@ -59,6 +69,14 @@ jobs:
- name: Build Project
run: npm run compile

- name: Cache VSCode installation
uses: actions/cache@v4
with:
path: |
~/.vscode-test/vscode-*
~/.vscode-test/extensions
key: cache-${{ hashFiles('integration-tests/src/runTest.ts') }}

- name: Test Project
run: npm run test

Expand Down

0 comments on commit 447a87d

Please sign in to comment.