mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
This reverts commit d7b27a17e3
.
This commit is contained in:
parent
e35bc26186
commit
83fd265950
10 changed files with 145 additions and 84 deletions
49
.github/actions/install/action.yml
vendored
49
.github/actions/install/action.yml
vendored
|
@ -1,49 +0,0 @@
|
|||
name: Install Tools & Dependencies
|
||||
description: Installs pnpm, JS runtime & package dependencies
|
||||
|
||||
inputs:
|
||||
node-version:
|
||||
description: 'Node version'
|
||||
required: false
|
||||
default: '16'
|
||||
js-runtime:
|
||||
description: 'JS runtime'
|
||||
required: false
|
||||
default: 'node'
|
||||
install-dependencies:
|
||||
description: 'Install dependencies'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Check inputs.js-runtime
|
||||
if: ${{ !contains(fromJson('["node", "deno"]'), inputs.js-runtime) }}
|
||||
run: echo "::warning::unknown 'js-runtime' value '${{ inputs.js-runtime }}'"
|
||||
shell: bash
|
||||
|
||||
- name: Check inputs.install-dependencies
|
||||
if: ${{ !contains(fromJson('["true", "false"]'), inputs.install-dependencies) }}
|
||||
run: echo "::warning::unknown 'install-dependencies' value '${{ inputs.install-dependencies }}'"
|
||||
shell: bash
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: pnpm
|
||||
|
||||
- name: Use Deno
|
||||
if: ${{ inputs.js-runtime == 'deno' }}
|
||||
uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.26.1
|
||||
|
||||
- name: Install dependencies
|
||||
if: ${{ fromJSON(inputs.install-dependencies) }}
|
||||
run: pnpm install
|
||||
shell: bash
|
19
.github/workflows/benchmark.yml
vendored
19
.github/workflows/benchmark.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
MAIN-BENCH-16: ${{ steps.benchmark-main.outputs.BENCH_RESULT16 }}
|
||||
strategy:
|
||||
matrix:
|
||||
NODE_VERSION: [14, 16]
|
||||
node-version: [14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -30,10 +30,17 @@ jobs:
|
|||
ref: ${{github.event.pull_request.head.sha}}
|
||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
@ -43,7 +50,7 @@ jobs:
|
|||
run: |
|
||||
pnpm run --silent benchmark > ./bench-result.md
|
||||
result=$(awk '/requests in/' ./bench-result.md)
|
||||
echo "::set-output name=BENCH_RESULT${{matrix.NODE_VERSION}}::$result"
|
||||
echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result"
|
||||
|
||||
# main benchmark
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -63,7 +70,7 @@ jobs:
|
|||
run: |
|
||||
pnpm run --silent benchmark > ./bench-result.md
|
||||
result=$(awk '/requests in/' ./bench-result.md)
|
||||
echo "::set-output name=BENCH_RESULT${{matrix.NODE_VERSION}}::$result"
|
||||
echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result"
|
||||
|
||||
output-benchmark:
|
||||
if: ${{ github.repository_owner == 'withastro' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!bench') }}
|
||||
|
|
13
.github/workflows/check.yml
vendored
13
.github/workflows/check.yml
vendored
|
@ -25,8 +25,17 @@ jobs:
|
|||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
|
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
|
@ -32,8 +32,17 @@ jobs:
|
|||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Status
|
||||
run: git status
|
||||
|
@ -78,10 +87,17 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
@ -105,11 +121,22 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
js-runtime: deno
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Use Deno
|
||||
uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.26.1
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
@ -133,10 +160,17 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
@ -158,11 +192,14 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
install-dependencies: false
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Checkout docs
|
||||
uses: actions/checkout@v3
|
||||
|
|
11
.github/workflows/format.yml
vendored
11
.github/workflows/format.yml
vendored
|
@ -17,8 +17,15 @@ jobs:
|
|||
ref: ${{ github.head_ref }}
|
||||
# Needs access to push to main
|
||||
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Format code
|
||||
run: pnpm run format:ci
|
||||
- name: Commit changes
|
||||
|
|
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
|
@ -41,8 +41,17 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Check Modified
|
||||
run: pnpm exec changeset status --output ./status.json
|
||||
|
|
23
.github/workflows/nightly.yml
vendored
23
.github/workflows/nightly.yml
vendored
|
@ -14,8 +14,17 @@ jobs:
|
|||
- name: Check out code using Git
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Collect stats
|
||||
run: node scripts/stats/index.js
|
||||
|
@ -39,10 +48,14 @@ jobs:
|
|||
- name: Check out code using Git
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
install-dependencies: false
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Delete the existing pnpm-lock.yaml file
|
||||
run: rm pnpm-lock.yaml
|
||||
|
|
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
@ -22,8 +22,17 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
|
13
.github/workflows/scripts.yml
vendored
13
.github/workflows/scripts.yml
vendored
|
@ -30,8 +30,17 @@ jobs:
|
|||
ref: main
|
||||
path: main
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Check Bundle Size
|
||||
uses: actions/github-script@v6
|
||||
|
|
14
.github/workflows/snapshot-release.yml
vendored
14
.github/workflows/snapshot-release.yml
vendored
|
@ -51,8 +51,18 @@ jobs:
|
|||
with:
|
||||
ref: ${{ steps.refs.outputs.head_ref }}
|
||||
|
||||
- name: Install Tools & Dependencies
|
||||
uses: ./.github/actions/install
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
|
Loading…
Reference in a new issue