| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- name: UNA CI
- on:
- push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
- permissions:
- contents: read
- jobs:
- test:
- runs-on: ubuntu-latest
- services:
- mysql:
- image: mariadb:11
- env:
- MYSQL_ROOT_PASSWORD: root
- MYSQL_DATABASE: una
- MYSQL_USER: una
- MYSQL_PASSWORD: una
- ports:
- - 3306:3306
- options: >-
- --health-cmd="healthcheck.sh --connect --innodb_initialized"
- --health-interval=10s
- --health-timeout=5s
- --health-retries=10
- steps:
- - uses: actions/checkout@v4
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: '8.3'
- extensions: intl, curl, gd, mbstring, zip, exif, pdo_mysql
- ini-values: short_open_tag=On, memory_limit=256M
- tools: composer
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: '24'
- cache: yarn
- - name: Install PHP dependencies
- run: composer install --prefer-dist --no-progress
- - name: Install JS dependencies
- run: yarn install --frozen-lockfile
- - name: Prepare writable paths
- run: |
- mkdir -p cache cache_public logs tmp storage
- chmod -R a+rwX inc cache cache_public logs tmp storage
- test -f plugins/ffmpeg/ffmpeg.exe && chmod 0755 plugins/ffmpeg/ffmpeg.exe
- - name: Install UNA
- working-directory: install
- run: >
- php cmd.php
- -m bx_antispam
- --db_host=127.0.0.1
- --db_name=una
- --db_user=una
- --db_password=una
- --server_http_host=localhost
- --server_php_self=/install/index.php
- - name: Run PHPUnit
- run: composer test
|