Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/~reusable_e2e_by_OS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,40 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}
- name: Get Puppeteer cache directory
id: puppeteer-cache-dir
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "dir=$HOME/.cache/puppeteer" >> $GITHUB_OUTPUT
else
echo "dir=$(echo ~/.cache/puppeteer)" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Cache Puppeteer binaries
uses: actions/cache@v3
with:
path: ${{ steps.puppeteer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-puppeteer-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-puppeteer-
- name: Override localhost to IPv4 in Linux for Node 18
run: |
sudo sed -i '/localhost/s/::1/#::1/' /etc/hosts
if: ${{ inputs.OS == 'ubuntu-22.04' && inputs.NODE_VERSION == '18' }}
- name: Install project dependencies (Linux)
if: ${{ inputs.OS == 'ubuntu-22.04' }}
run: |
echo "Starting npm ci with a 10-minute timeout"
echo "Starting npm ci with a 15-minute timeout"
for i in 1 2 3; do # Retry logic, retry 3 times
timeout 10m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..."
timeout 15m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..."
done
- name: Install project dependencies (Macos)
if: ${{ inputs.OS == 'macos-latest' }}
run: |
echo "Starting npm ci with a 10-minute timeout"
echo "Starting npm ci with a 15-minute timeout"
brew install coreutils
for i in 1 2 3; do # Retry logic, retry 3 times
gtimeout 10m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..."
gtimeout 15m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..."
done
- name: Install project dependencies (Windows)
if: ${{ inputs.OS == 'windows-latest' }}
Expand Down
Loading