Skip to content

Commit

Permalink
chore: improve ci (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
orionmiz authored Jan 2, 2025
1 parent 85c8fb3 commit 1535331
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 198 deletions.
79 changes: 17 additions & 62 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: "20"

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
.yarn/unplugged/
.yarn/build-state.yml
.yarn/install-state.gz
node_modules
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1
Expand All @@ -39,71 +37,28 @@ jobs:
yarn install --immutable
shell: bash

- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
restore-keys: |
ultra-cache-main-v2
${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-
${{ runner.os }}-ultra-v1-main-
- name: Build the entire monorepo
run: |
yarn build
- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
if: github.event_name == 'push'
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
98 changes: 26 additions & 72 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ jobs:
name: Check whether the written test passes normally
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: "20"

- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-unplugged-cache
with:
path: |
'.yarn/unplugged/'
'.yarn/build-state.yml'
'.yarn/install-state.gz'
node_modules
.yarn/unplugged/
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
Expand All @@ -36,38 +34,17 @@ jobs:
yarn install --immutable
shell: bash

- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
restore-keys: |
ultra-cache-main-v2
${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-
${{ runner.os }}-ultra-v1-main-
- name: Check whether all tests written in the monorepo pass normally
run: |
Expand All @@ -78,20 +55,18 @@ jobs:
name: Check the TypeScript typings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: "20"

- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-unplugged-cache
with:
path: |
'.yarn/unplugged/'
'.yarn/build-state.yml'
'.yarn/install-state.gz'
node_modules
.yarn/unplugged/
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
Expand All @@ -101,38 +76,17 @@ jobs:
yarn install --immutable
shell: bash

- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
restore-keys: |
ultra-cache-main-v2
${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-
${{ runner.os }}-ultra-v1-main-
- name: Build all .d.ts of packages
run: |
Expand Down
83 changes: 19 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,19 @@ jobs:
name: Create PR or release packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-unplugged-cache
with:
path: |
'.yarn/unplugged/'
'.yarn/build-state.yml'
'.yarn/install-state.gz'
node_modules
.yarn/unplugged/
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
Expand All @@ -36,73 +34,30 @@ jobs:
yarn install --immutable
shell: bash

- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
restore-keys: |
ultra-cache-main-v2
${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-
${{ runner.os }}-ultra-v1-main-
- name: Build the entire monorepo
run: |
yarn build
- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
with:
path: |
core/dist/
core/.ultra.cache.json
demo/build/
demo/dist/
demo/.ultra.cache.json
docs/.next/
docs/.ultra.cache.json
extensions/compat-await-push/dist/
extensions/compat-await-push/.ultra.cache.json
extensions/link/dist/
extensions/link/.ultra.cache.json
extensions/plugin-basic-ui/dist/
extensions/plugin-basic-ui/.ultra.cache.json
extensions/plugin-history-sync/dist/
extensions/plugin-history-sync/.ultra.cache.json
extensions/plugin-preload/dist/
extensions/plugin-preload/.ultra.cache.json
extensions/plugin-renderer-basic/dist/
extensions/plugin-renderer-basic/.ultra.cache.json
extensions/plugin-renderer-web/dist/
extensions/plugin-renderer-web/.ultra.cache.json
extensions/plugin-stack-depth-change/dist/
extensions/plugin-stack-depth-change/.ultra.cache.json
integrations/react/dist/
integrations/react/.ultra.cache.json
packages/esbuild-config/.ultra.cache.json
key: ultra-cache-main-v2
**/dist/
**/build/
**/.next/
**/.ultra.cache.json
key: ${{ runner.os }}-ultra-v1-${{ github.head_ref || github.ref_name }}-${{ github.sha }}

- name: Create PR or release packages
uses: changesets/action@v1
Expand Down

0 comments on commit 1535331

Please sign in to comment.