Add Uid normalizer #106
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: "tests" | |
on: | |
pull_request: ~ | |
push: | |
branches: [main] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.1" | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
dependencies: | |
- highest | |
include: | |
- php-version: "8.2" | |
dependencies: lowest | |
fail-fast: false | |
services: | |
database: | |
image: mysql:8 | |
ports: | |
- 3306:3306 | |
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 | |
env: | |
MYSQL_ROOT_PASSWORD: odmroot | |
MYSQL_DATABASE: odm | |
MYSQL_USER: odm | |
MYSQL_PASSWORD: odm | |
steps: | |
- name: Use legacy password hashing in MySQL | |
if: ${{ contains(fromJson('["7.1", "7.2", "7.3"]'), matrix.php-version) }} | |
env: | |
MYSQL_PWD: odmroot | |
run: | | |
mysql -h127.0.0.1 -uroot -e "ALTER USER odm IDENTIFIED WITH mysql_native_password BY 'odm'" | |
- name: Start PostgreSQL | |
run: | | |
sudo systemctl start postgresql.service | |
pg_isready | |
sudo -u postgres psql -c "create user odm WITH PASSWORD 'odm';" | |
sudo -u postgres psql -c "create database odm OWNER odm;" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, pdo_pgsql | |
- name: Install dependencies | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: Install PHPUnit | |
run: php vendor/bin/simple-phpunit install | |
- name: Run tests (MySQL) | |
env: | |
DATABASE_URL: mysql://odm:[email protected]/odm?serverVersion=8.0 | |
run: php vendor/bin/simple-phpunit | |
- name: Run tests (PostgreSQL) | |
env: | |
DATABASE_URL: postgresql://odm:odm@localhost/odm?serverVersion=14&charset=utf8 | |
run: php vendor/bin/simple-phpunit |