ci: add clean install check
This commit is contained in:
51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
@@ -5,6 +5,57 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
install-check:
|
||||||
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: false
|
||||||
|
|
||||||
|
- name: Checkout submodules (retry)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
git submodule sync --recursive
|
||||||
|
for attempt in 1 2 3 4 5; do
|
||||||
|
if git -c protocol.version=2 submodule update --init --force --depth=1 --recursive; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Submodule update failed (attempt $attempt/5). Retrying…"
|
||||||
|
sleep $((attempt * 10))
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Runtime versions
|
||||||
|
run: |
|
||||||
|
node -v
|
||||||
|
npm -v
|
||||||
|
|
||||||
|
- name: Capture node path
|
||||||
|
run: echo "NODE_BIN=$(dirname \"$(node -p \"process.execPath\")\")" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Enable corepack and pin pnpm
|
||||||
|
run: |
|
||||||
|
corepack enable
|
||||||
|
corepack prepare pnpm@10.23.0 --activate
|
||||||
|
pnpm -v
|
||||||
|
|
||||||
|
- name: Install dependencies (frozen)
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
run: |
|
||||||
|
export PATH="$NODE_BIN:$PATH"
|
||||||
|
which node
|
||||||
|
node -v
|
||||||
|
pnpm -v
|
||||||
|
pnpm install --frozen-lockfile --ignore-scripts=false --config.engine-strict=false --config.enable-pre-post-scripts=true
|
||||||
|
|
||||||
checks:
|
checks:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
Reference in New Issue
Block a user