expo / expo/expo-github-action

Setup EAS step is very slow on new PR (cache issue?)

Open
#335 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
107
PR merge metrics
No merged PRs in 30d

Description

> [!NOTE]
> This issue is very similar to what @FaureAlexis described on #250.
> I reopened a new one as suggested by GitHub as the last one was closed one year ago.

### Description of the bug

The `Λ Setup EAS` step is very slow (almost 3min) for the **first run** in new **PR**s.

![Image](https://github.com/user-attachments/assets/e64ba32c-7e3e-4b4d-bfea-6fb018f5a83a)

But it goes much faster on subsequent runs on the same PR (a few seconds)

![Image](https://github.com/user-attachments/assets/f9579912-6836-4c06-bff2-7ffaa99d5518)

### To Reproduce

1. Create a GitHub workflow with the following content

```yaml
name: App

on:
pull_request:
branches: [main]

jobs:
eas-preview:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
actions: write
packages: write
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: 🌿 Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: app/package-lock.json

- name: Λ Setup EAS
uses: expo/expo-github-action@v8
with:
token: ${{ secrets.EXPO_TOKEN }}
packager: npm
eas-version: latest
```

2. Create a new PR to trigger the workflow

#### Additional info

I run this workflow on a private repo, and my app is located in an `app` directory

#### Expected behavior

To run faster from the first run.

#### Actual behavior

On the first run, The `Λ Setup EAS` step is very slow (almost 3min).
After `Patching system watchers for the 'ENOSPC' error`, the job seems idle for almost 2min.

### Additional context

The first run seems to be missing the cache.
The cache was marked as successfully saved in the previously merged PR on `main` with the same version of eas:

```
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/expo-poc/expo-poc --files-from manifest.txt --use-compress-program zstdmt
Cache Size: ~14 MB (14890194 B)
Cache saved successfully
```

Also, I noticed a cache conflict with `actions/setup-node@v4` post step on every jobs

![Image](https://github.com/user-attachments/assets/63b8bff9-1547-4a82-b933-a38f1ff84c1c)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.