mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
ci: add tests workflow
This commit is contained in:
parent
c7f18fd489
commit
50ecb2efc4
1 changed files with 80 additions and 0 deletions
80
.github/workflows/tests.yaml
vendored
Normal file
80
.github/workflows/tests.yaml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**v5.x**'
|
||||
|
||||
jobs:
|
||||
composer-validate:
|
||||
name: Validate composer.json
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.4'
|
||||
|
||||
- name: Validate composer.json
|
||||
run: composer validate --check-lock --strict
|
||||
|
||||
security-audit:
|
||||
name: Composer Security 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 Security Audit
|
||||
run: composer audit --locked --abandoned=fail
|
||||
|
||||
test:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: [composer-validate]
|
||||
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: Tests
|
||||
run: composer test:all
|
||||
Loading…
Reference in a new issue