Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 17 additions & 4 deletions .github/actions/setup-ci/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "Setup CI environment"
description: "Setup Cloudserver CI environment"
name: 'Setup CI environment'
description: 'Setup Cloudserver CI environment'

runs:
using: composite
Expand All @@ -26,16 +26,29 @@ runs:
set -exu;
mkdir -p /tmp/coverage/${JOB_NAME}/;
- uses: actions/setup-node@v4
id: node
with:
node-version: '22.23.1'
cache: 'yarn'
# Cache node_modules directly (not the yarn download cache) so the git
# dependencies' TypeScript compilation and relink are skipped on a hit.
# Key includes runner.os and the resolved Node version because node_modules
# can hold native addons compiled for a specific OS/Node; the Node version
# is taken from the setup-node output rather than hardcoded.
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.node.outputs.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- name: install typescript
shell: bash
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn global add typescript@4.9.5
- name: install dependencies
shell: bash
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --ignore-engines --frozen-lockfile --network-concurrency 1
- uses: actions/cache@v3
- uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
Expand Down
38 changes: 34 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,21 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-node@v4
id: node
with:
node-version: '22.23.1'
cache: yarn
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.node.outputs.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- name: install typescript
shell: bash
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn global add typescript@4.9.5
- name: install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-concurrency 1
- uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -125,10 +133,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: node
with:
node-version: '22.23.1'
cache: yarn
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.node.outputs.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- name: install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Count async/await migration progress
run: yarn run count-async
Expand All @@ -139,13 +154,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: node
with:
node-version: '22.23.1'
cache: yarn
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.node.outputs.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- name: install typescript
shell: bash
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn global add typescript@4.9.5
- name: install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Unit Coverage
run: |
Expand Down Expand Up @@ -1087,10 +1110,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
id: node
with:
node-version: '22.23.1'
cache: yarn
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.node.outputs.node-version }}-modules-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Delete stale GCP CI buckets
run: yarn run cleanup_gcp_buckets
Expand Down
Loading