Job randomly hangs #909
-
|
Hi, Error: The HOME or COMPOSER_HOME environment variable must be set for composer to run correctlyWhich was fixed by adding env:
HOME: /home/githubThe jobs work fine, but others randomly hang with: ==> Setup PHP
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is requiredname: "Continuous Integration"
on:
push:
concurrency:
group: group-${{ github.ref }}
cancel-in-progress: true
env:
COLUMNS: 120
HOME: /home/github
COMPOSER_ALLOW_SUPERUSER: 1
jobs:
php-cs-fixer:
name: PHP Coding Standards
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: curl, gd, redis
ini-values: memory_limit=-1, error_reporting=E_ALL, display_errors=On
tools: composer
coverage: none
env:
fail-fast: true
runner: self-hosted
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install composer packages
run: composer install --classmap-authoritative
- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer check --diff |
Beta Was this translation helpful? Give feedback.
Answered by
shivammathur
Jan 29, 2025
Replies: 1 comment
-
|
Please setup password less sudo on your runner |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gaborjonasecd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please setup password less sudo on your runner
https://github.com/shivammathur/setup-php/wiki/Requirements-for-self-hosted-runners