diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbc3dbe..6cf395c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,7 @@ jobs: env: GH_APP_ID: ${{ vars.GH_APP_ID }} GH_APP_PRIVATE_KEY_PEM_B64: ${{ secrets.GH_APP_PRIVATE_KEY_PEM_B64 }} + PRESERVE_ON_FAILURE: "1" run: | export GH_TOKEN=$(uv run tests/get_github_app_token.py) gh auth setup-git diff --git a/tests/test_e2e.sh b/tests/test_e2e.sh index b007a0b..2045d27 100755 --- a/tests/test_e2e.sh +++ b/tests/test_e2e.sh @@ -458,6 +458,11 @@ echo >&2 "2. Creating remote GitHub repository: $REPO_FULL_NAME" log_cmd gh repo create "$REPO_FULL_NAME" --description "Temporary E2E test repo for update-pr-stack action" --public echo >&2 "Successfully created $REPO_FULL_NAME" + +# Enable GitHub Actions on the new repository (may be disabled by default in CI environments) +echo >&2 "Enabling GitHub Actions on the repository..." +log_cmd gh api -X PUT "/repos/$REPO_FULL_NAME/actions/permissions" --input - <<< '{"enabled":true,"allowed_actions":"all"}' + # 3. Push initial state echo >&2 "3. Pushing initial state to remote..." REMOTE_URL="https://github.com/$REPO_FULL_NAME.git"