Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions .github/workflows/lint-test-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ on:
jobs:
lint-test-sdk:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ '18', '20', '22', '23' ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- uses: actions/cache@v2
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: './node_modules'
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the recommended cache setup for yarn 1.x - source https://github.com/actions/cache/blob/main/examples.md#node---yarn

- name: 'Set up GCP SDK for downloading test data'
uses: 'google-github-actions/setup-gcloud@v0'
- name: Install SDK dependencies
Expand All @@ -30,16 +39,25 @@ jobs:
working-directory: ./
typecheck:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ '18', '20', '22', '23' ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- uses: actions/cache@v2
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: './node_modules'
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install SDK dependencies
run: yarn --frozen-lockfile
working-directory: ./
Expand Down
Loading