mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 06:13:54 +01:00
Cleanup
This commit is contained in:
parent
d0c2cb500d
commit
c41047c55c
17
tests/lock_setup.php
Normal file
17
tests/lock_setup.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
$lock = fopen('/tmp/woodpecker.lock', 'c+');
|
||||
flock($lock, LOCK_EX);
|
||||
|
||||
if (fread($lock, 1) !== "1") {
|
||||
exec("tests/setup.sh", $o, $res);
|
||||
fwrite($lock, "1");
|
||||
} else {
|
||||
$o = [];
|
||||
$res = 0;
|
||||
}
|
||||
|
||||
flock($lock, LOCK_UN);
|
||||
|
||||
echo implode("\n", $o);
|
||||
exit($res);
|
16
tests/setup.sh
Executable file
16
tests/setup.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
export COMPOSER_PROCESS_TIMEOUT=100000
|
||||
|
||||
apk add procps git unzip github-cli openssh
|
||||
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
mv composer.phar /usr/local/bin/composer
|
||||
|
||||
php tests/jit.php
|
||||
|
||||
composer update
|
@ -4,25 +4,7 @@ set -ex
|
||||
|
||||
export COMPOSER_PROCESS_TIMEOUT=100000
|
||||
|
||||
(
|
||||
flock -x 200 || exit 1
|
||||
|
||||
touch /tmp/ci_status
|
||||
if [ "$(cat /tmp/ci_status)" != "done" ]; then
|
||||
apk add procps git unzip github-cli openssh
|
||||
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
mv composer.phar /usr/local/bin/composer
|
||||
|
||||
php tests/jit.php
|
||||
|
||||
composer update
|
||||
|
||||
echo done > /tmp/ci_status
|
||||
fi
|
||||
) 200>/var/lock/woodpecker.lock
|
||||
php tests/lock_setup.php
|
||||
|
||||
if [ "$1" == "cs" ]; then
|
||||
composer psalm
|
||||
|
Loading…
x
Reference in New Issue
Block a user