Skip to content

Fix date

Fix date #109

Workflow file for this run

name: Codeception
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
jobs:
test:
name: PHP ${{ matrix.php-versions }} + ${{ matrix.db }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["7.1", "7.2", "7.3", "7.4"]
db: ["mysql", "pgsql"]
env:
DEFAULT_COMPOSER_FLAGS: "--no-interaction --no-ansi --no-progress --no-suggest"
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Setup PHP Action
uses: shivammathur/setup-php@2.5.0
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, gd, imagick, zip, dom, pdo_mysql, pdo_pgsql, fileinfo
ini-values: post_max_size=256M
tools: php-cs-fixer, phpunit
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Composer dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Prepare the application
run: cp .github/workflows/.env.${{ matrix.db }} tests/.env
- name: Test with Codeception
run: |
vendor/bin/codecept run unit
vendor/bin/codecept run functional
env:
SECURITY_KEY: abcde12345
DEFAULT_SITE_URL: http://snipcart-craft-plugin.test/index.php
FROM_EMAIL_NAME: Craft CMS
FROM_EMAIL_ADDRESS: info@craftcms.com