Skip to content

Commit

Permalink
less caching
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Jan 23, 2025
1 parent 01bacdb commit eb809bd
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ inputs:
node-version:
description: the version of Node.js to install
default: 18.20.5
install:
description: "Run pnpm install"
turbo-api:
description: the api URL for connecting to the turbo remote cache
turbo-team:
Expand Down Expand Up @@ -39,5 +41,6 @@ runs:
echo TURBO_ENV_MODE=loose >> .env
- name: Install NPM Dependencies
if: inputs.install
shell: bash
run: pnpm install --frozen-lockfile
71 changes: 65 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
install: true
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
Expand Down Expand Up @@ -102,13 +103,19 @@ jobs:
with:
fetch-depth: 0

- name: Cache repository
uses: actions/cache@v3
id: cache-repo
- name: node_modules
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-${{ matrix.os }}-ci-cache
path: node_modules

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
key: ${{ github.sha }}-${{ matrix.os }}-ci-cache
path: |
node_modules
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}

- name: Check for errors
run: pnpm run check
Expand All @@ -118,3 +125,55 @@ jobs:

- name: Check the changesets
run: node -r esbuild-register tools/deployments/validate-changesets.ts

test:
timeout-minutes: 30
needs: ["build"]

name: "Tests"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
filter:
[
"./packages/*",
"./fixtures/*",
"./packages/vite-plugin-cloudflare/playground",
]
# Things in the tools folder are for running in CI, and so only need to run on linux
include:
- os: ubuntu-latest
filter: "./tools"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
if: ${{ steps.cache-repo.outputs.cache-hit != 'true' }}
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: node_modules
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-${{ matrix.os }}-ci-cache
path: node_modules

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}

- name: Run tests
if: steps.changes.outputs.everything_but_markdown == 'true'
run: pnpm run test:ci --concurrency 1 --filter=${{ matrix.filter }}
env:
TMP_CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TMP_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
NODE_OPTIONS: "--max_old_space_size=8192"
WRANGLER_LOG_PATH: ${{ runner.temp }}/wrangler-debug-logs/
TEST_REPORT_PATH: ${{ runner.temp }}/test-report/index.html
CI_OS: ${{ runner.os }}

0 comments on commit eb809bd

Please sign in to comment.