0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Revert "GitHub Actions: add install action (#5196)" (#5242)

This reverts commit d7b27a17e3.
This commit is contained in:
Matthew Phillips 2022-10-28 14:36:50 -04:00 committed by GitHub
parent e35bc26186
commit 83fd265950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 145 additions and 84 deletions

View file

@ -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

View file

@ -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') }}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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