Serial2Format/.gitea/workflows/actions.yml
DavidDevGt c7bb015567
Some checks failed
CI/CD Pipeline for PHP / build (push) Failing after 3s
Solución para instalar Node.js manualmente
2024-09-05 14:07:07 -06:00

45 lines
994 B
YAML

name: CI/CD Pipeline for PHP
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node.js manually
run: |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
node -v
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer
- name: Install dependencies
run: composer install
- name: Lint PHP files
run: |
composer require --dev squizlabs/php_codesniffer
./vendor/bin/phpcs --standard=PSR12 src/
- name: Run tests
run: |
if [ -f vendor/bin/phpunit ]; then
vendor/bin/phpunit --verbose
else
echo "PHPUnit no está instalado o no hay pruebas configuradas."
fi