mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 12:18:07 +00:00
ci: retry npm install once after a failure (#8280)
This commit is contained in:
1 parent
63c4f54a89
commit
abc483d9d0
4 files changed
+18
-5
No files matched your search
@@ -1925,8 +1925,8 @@ jobs:
|
||||
if: steps.plan.outputs.nodejs_version
|
||||
working-directory: packages/simplex-chat-nodejs
|
||||
run: |
|
||||
(cd ../simplex-chat-client/types/typescript && npm install --no-audit --no-fund && npx tsc)
|
||||
npm install --ignore-scripts --no-save --no-audit --no-fund ../simplex-chat-client/types/typescript
|
||||
(cd ../simplex-chat-client/types/typescript && "$GITHUB_WORKSPACE/scripts/ci/npm-install.sh" && npx tsc)
|
||||
"$GITHUB_WORKSPACE/scripts/ci/npm-install.sh" --ignore-scripts --no-save ../simplex-chat-client/types/typescript
|
||||
npx tsc && cp src/simplex.* dist
|
||||
npx jest tests/libs.test.ts tests/api.unit.test.ts
|
||||
|
||||
@@ -1942,7 +1942,7 @@ jobs:
|
||||
VERSION: ${{ steps.plan.outputs.types_version }}
|
||||
DIST_TAG: ${{ steps.plan.outputs.types_dist_tag }}
|
||||
run: |
|
||||
npm install --no-audit --no-fund
|
||||
"$GITHUB_WORKSPACE/scripts/ci/npm-install.sh"
|
||||
npm publish --provenance --access public --tag "$DIST_TAG"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: website
|
||||
run: ../scripts/ci/npm-install.sh
|
||||
|
||||
- name: Install dependencies & build
|
||||
run: |
|
||||
./website/web.sh
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
npm install --no-audit --no-fund "$@" && exit
|
||||
echo "npm install failed, retrying in 7 minutes" >&2
|
||||
sleep 420
|
||||
npm install --no-audit --no-fund "$@"
|
||||
@@ -7,6 +7,7 @@ nodejs=packages/simplex-chat-nodejs
|
||||
python_package=packages/simplex-chat-python
|
||||
python=$(command -v python3 || command -v python)
|
||||
temp=${RUNNER_TEMP:-$(mktemp -d)}
|
||||
npm_install=$PWD/scripts/ci/npm-install.sh
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 build <platform> | test | addon <platform> | publish <platform> [nodejs] [python]" >&2
|
||||
@@ -14,8 +15,8 @@ usage() {
|
||||
}
|
||||
|
||||
build_package() {
|
||||
(cd packages/simplex-chat-client/types/typescript && npm install --no-audit --no-fund && npx tsc)
|
||||
(cd "$nodejs" && npm install --ignore-scripts --no-save --no-audit --no-fund ../simplex-chat-client/types/typescript)
|
||||
(cd packages/simplex-chat-client/types/typescript && "$npm_install" && npx tsc)
|
||||
(cd "$nodejs" && "$npm_install" --ignore-scripts --no-save ../simplex-chat-client/types/typescript ${1:+node-gyp})
|
||||
if [ -n "${1:-}" ]; then
|
||||
(cd "$nodejs" && npx --yes node-gyp rebuild)
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user