Skip to content

Commit

Permalink
Action fix by moving tests to host specific folder and setting proper
Browse files Browse the repository at this point in the history
permissions.
  • Loading branch information
lotharthesavior committed Aug 20, 2023
1 parent 9e4d1a6 commit 2ff7fb9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
30 changes: 19 additions & 11 deletions .github/actions/prepare-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,10 @@ runs:
php-version: '8.2'
extensions: openswoole
coverage: none
tools: composer, phpunit
env:
fail-fast: true

- name: Debug
shell: bash
run: |
echo "================================"
echo "================================"
php -i
echo "================================"
php -i | grep php.ini
echo "================================"
echo "================================"
- name: Validate composer.json and composer.lock
shell: bash
run: composer validate
Expand All @@ -40,3 +30,21 @@ runs:
if: steps.composer-cache.outputs.cache-hit != 'true'
shell: bash
run: composer install --prefer-dist --no-progress --no-suggest

- name: Change php-fpm to run with TCP
shell: bash
run: sudo sed -i 's/listen = \/run\/php\/php8.2-fpm.sock/listen = 127.0.0.1:9000/' /etc/php/8.2/fpm/pool.d/www.conf

- name: Keep only php-fpm 8.2
shell: bash
run: |
sudo service php8.1-fpm stop
sudo service php8.2-fpm stop
sudo ps aux | grep php-fpm
sudo service php8.2-fpm start
- name: Copy jacked server to linux host place
shell: bash
run: |
sudo cp -r ${{ github.workspace }} /var/www/jacked-server
sudo chown -R www-data /var/www/jacked-server
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ jobs:

- name: Run test suite
shell: bash
run: php vendor/bin/phpunit
run: |
cd /var/www/jacked-server
sudo -u www-data -- vendor/bin/phpunit

0 comments on commit 2ff7fb9

Please sign in to comment.