Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Nov 30, 2024
1 parent 5eff16c commit 0f24dde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/REUSABLE_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
MYSQL_PASSWORD: ${{ env.DB_PASSWORD }}
MYSQL_ROOT_PASSWORD: root
ports:
- 33306:33306
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10
postgres:
image: ${{ matrix.driver == 'pgsql' && matrix.service || '' }}
Expand All @@ -180,7 +180,6 @@ jobs:
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'

if: >-
false &&
inputs.enable_backend_testing &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
Expand All @@ -189,6 +188,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: mysql version
run: mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -ppassword -e "SELECT @@VERSION"

Expand All @@ -204,13 +204,13 @@ jobs:
- name: mysql version
if: ${{ matrix.driver == 'mysql' || matrix.driver == 'mariadb' }}
run: |
mysql -h 127.0.0.1 --port 33306 -uroot -proot -e "SELECT @@VERSION"
mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "SELECT @@VERSION"
- name: Create ${{ matrix.db }} Database
if: ${{ matrix.driver == 'mysql' || matrix.driver == 'mariadb' }}
run: |
sudo systemctl start mysql
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 33306
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 3306
- name: Install Composer dependencies
run: composer install
Expand All @@ -234,7 +234,7 @@ jobs:
fi
working-directory: ${{ inputs.backend_directory }}
env:
DB_PORT: ${{ matrix.driver == 'mysql' && 33306 || (matrix.driver == 'mariadb' && 33306 || 15432) }}
DB_PORT: ${{ matrix.driver == 'mysql' && 3306 || (matrix.driver == 'mariadb' && 3306 || 15432) }}
DB_PREFIX: ${{ matrix.prefix }}
DB_DRIVER: ${{ matrix.driver }}
COMPOSER_PROCESS_TIMEOUT: 600
Expand All @@ -250,12 +250,11 @@ jobs:
mysql:
image: mysql:8.0.30
ports:
- 33306:3306
- 3306

name: 'PHPStan PHP ${{ matrix.php }}'

if: >-
false &&
inputs.enable_phpstan &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
Expand All @@ -278,12 +277,12 @@ jobs:
- name: Create MySQL Database
run: |
sudo systemctl start mysql
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 33306
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 3306
- name: Run PHPStan
run: composer analyse:phpstan
env:
DB_PORT: 33306
DB_PORT: 3306
DB_PASSWORD: root
COMPOSER_PROCESS_TIMEOUT: 600
FLARUM_TEST_TMP_DIR_LOCAL: ./tmp
24 changes: 0 additions & 24 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 0f24dde

Please sign in to comment.