mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
100 lines
2.3 KiB
YAML
100 lines
2.3 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**v5.x**"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
composer-validate:
|
|
name: Validate composer.json
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
|
|
- name: Validate composer.json
|
|
run: composer validate --check-lock --strict
|
|
|
|
composer-audit:
|
|
name: Composer Audit
|
|
runs-on: ubuntu-latest
|
|
needs: [composer-validate]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /vendor
|
|
key: php-${{ hashFiles('composer.lock') }}
|
|
|
|
- name: Install PHP dependencies
|
|
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
run: composer install --no-progress --no-interaction
|
|
|
|
- name: Run Composer audit
|
|
run: composer audit --locked --abandoned=fail
|
|
|
|
bun-audit:
|
|
name: Bun Audit
|
|
runs-on: ubuntu-latest
|
|
needs: [composer-validate]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.2.16
|
|
- name: Run Bun audit
|
|
run: bun audit --frozen-lockfile
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: [composer-audit, bun-audit]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP with Xdebug
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
coverage: xdebug
|
|
|
|
# - name: Install aspell
|
|
# run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /vendor
|
|
key: php-${{ hashFiles('composer.lock') }}
|
|
|
|
- name: Install PHP dependencies
|
|
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
run: composer install --no-progress --no-interaction
|
|
|
|
- name: Run tests
|
|
run: composer test:all
|