update ci #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ICE TESTS | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer install | |
- name: Install and configure Coturn | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y coturn | |
# Stop any running Coturn service first | |
sudo systemctl stop coturn || true | |
# Create directories and copy files | |
sudo mkdir -p /etc/turnserver | |
sudo cp tests/turnconfig/turnserver.conf /etc/turnserver/ | |
sudo cp tests/turnconfig/turnserver.crt /etc/turnserver/ | |
sudo cp tests/turnconfig/turnserver.key /etc/turnserver/ | |
# Create log directory | |
sudo mkdir -p /var/log/ | |
sudo touch /var/log/turnserver.log | |
sudo chmod 666 /var/log/turnserver.log | |
# Start Coturn with our custom config | |
sudo turnserver -c /etc/turnserver/turnserver.conf -v & | |
# Wait for server to start | |
sleep 5 | |
# Verify server is running | |
ps aux | grep turnserver | |
netstat -tulnp | grep -E '3478|5349' | |
- name: Run PHPUnit tests | |
run: vendor/bin/phpunit |