Adjust github action file #29
Workflow file for this run
This file contains 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: Codeception tests | |
on: [ push ] | |
jobs: | |
build: | |
name: ${{matrix.operating-system}}, PHP ${{ matrix.php }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-latest, ubuntu-20.04 ] | |
php: [ '8.0', '8.1' ] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: kodus_db_cache_test | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root | |
ports: | |
- 5432:5432 | |
mysql: | |
image: mysql | |
env: | |
MYSQL_DATABASE: kodus_db_cache_test | |
MYSQL_USER: root | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Install dependencies | |
run: composer install | |
- name: Verify Installed PHP Extensions | |
run: php -m | |
- name: Test MySQL Connectivity | |
run: sudo apt-get update && sudo apt-get install -y mysql-client; mysqladmin ping -h mysql -u root --password=root | |
- name: Test PostgreSQL Connectivity | |
run: apt-get update && apt-get install -y postgresql-client; pg_isready -h postgres -U root | |
- name: Run tests | |
run: php vendor/bin/phpunit |