mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
ci: add retry logic and electron caching to all test jobs
Make yarn install resilient to transient network failures by adding retry loop (3 attempts), network timeout/concurrency flags, and caching electron binaries across runs. Fixes intermittent "server aborted pending request" errors on Mac Apple Silicon CI runner.
This commit is contained in:
@@ -21,8 +21,21 @@ jobs:
|
|||||||
node-version: 22
|
node-version: 22
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- name: Cache electron binaries
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/electron
|
||||||
|
key: ${{ runner.os }}-electron-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-electron-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-engines
|
run: |
|
||||||
|
for i in 1 2 3; do
|
||||||
|
echo "yarn install attempt $i"
|
||||||
|
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
|
||||||
|
sleep 5
|
||||||
|
[ "$i" = "3" ] && exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Download IPFS
|
- name: Download IPFS
|
||||||
run: node electron/download-ipfs && chmod +x bin/linux/ipfs
|
run: node electron/download-ipfs && chmod +x bin/linux/ipfs
|
||||||
@@ -75,8 +88,21 @@ jobs:
|
|||||||
# Use pip with --break-system-packages for CI environment
|
# Use pip with --break-system-packages for CI environment
|
||||||
pip3 install --break-system-packages setuptools || pip3 install --user setuptools || true
|
pip3 install --break-system-packages setuptools || pip3 install --user setuptools || true
|
||||||
|
|
||||||
|
- name: Cache electron binaries
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/Library/Caches/electron
|
||||||
|
key: ${{ runner.os }}-electron-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-electron-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-engines
|
run: |
|
||||||
|
for i in 1 2 3; do
|
||||||
|
echo "yarn install attempt $i"
|
||||||
|
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
|
||||||
|
sleep 5
|
||||||
|
[ "$i" = "3" ] && exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Download IPFS
|
- name: Download IPFS
|
||||||
run: node electron/download-ipfs && chmod +x bin/mac/ipfs
|
run: node electron/download-ipfs && chmod +x bin/mac/ipfs
|
||||||
@@ -135,8 +161,21 @@ jobs:
|
|||||||
# Use pip with --break-system-packages for CI environment
|
# Use pip with --break-system-packages for CI environment
|
||||||
pip3 install --break-system-packages setuptools || pip3 install --user setuptools || true
|
pip3 install --break-system-packages setuptools || pip3 install --user setuptools || true
|
||||||
|
|
||||||
|
- name: Cache electron binaries
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/Library/Caches/electron
|
||||||
|
key: ${{ runner.os }}-electron-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-electron-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-engines
|
run: |
|
||||||
|
for i in 1 2 3; do
|
||||||
|
echo "yarn install attempt $i"
|
||||||
|
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
|
||||||
|
sleep 5
|
||||||
|
[ "$i" = "3" ] && exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Download IPFS
|
- name: Download IPFS
|
||||||
run: node electron/download-ipfs && chmod +x bin/mac/ipfs
|
run: node electron/download-ipfs && chmod +x bin/mac/ipfs
|
||||||
@@ -195,8 +234,22 @@ jobs:
|
|||||||
node-version: 22
|
node-version: 22
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- name: Cache electron binaries
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/AppData/Local/electron/Cache
|
||||||
|
key: ${{ runner.os }}-electron-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-electron-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
for i in 1 2 3; do
|
||||||
|
echo "yarn install attempt $i"
|
||||||
|
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
|
||||||
|
sleep 5
|
||||||
|
[ "$i" = "3" ] && exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Download IPFS
|
- name: Download IPFS
|
||||||
run: node electron/download-ipfs
|
run: node electron/download-ipfs
|
||||||
@@ -257,7 +310,13 @@ jobs:
|
|||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile --ignore-engines
|
run: |
|
||||||
|
for i in 1 2 3; do
|
||||||
|
echo "yarn install attempt $i"
|
||||||
|
yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1 && break
|
||||||
|
sleep 5
|
||||||
|
[ "$i" = "3" ] && exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Build React App
|
- name: Build React App
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|||||||
Reference in New Issue
Block a user