diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml deleted file mode 100644 index 34b1158ea..000000000 --- a/.github/actions/install/action.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9d7f2db26..3e40038c9 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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') }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8b2358316..b8826f538 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f796699fc..b98f3bc55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 4ff3ada9d..0645326f6 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8799a751..02344ecdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3c074afe4..528abb6cd 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bf10fa6e..e3f348c0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 91b7201ea..60cf929c7 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -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 diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 9d3d5d20b..da37c4b52 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -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