Skip to content

Merge pull request #38 from creode/feature/allow_login_without_link #106

Merge pull request #38 from creode/feature/allow_login_without_link

Merge pull request #38 from creode/feature/allow_login_without_link #106

name: Run Automated Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [8.2, 8.3]
dependency-version: [prefer-stable]
os: [ubuntu-latest]
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
# Service containers to run with `container-job`
services:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:8.0
# Provide the password for postgres
env:
MYSQL_DATABASE: craft_tests
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Setup Tests
run: cp tests/example-env-ci tests/.env
- name: Run test suite
run: composer run-script test
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}