Skip to content

CodeIgniterを4.4に更新 #66

CodeIgniterを4.4に更新

CodeIgniterを4.4に更新 #66

Workflow file for this run

name: PHPUnit
on:
pull_request:
branches:
- develop
paths:
- 'app/**'
- 'tests/**'
- composer.*
- phpunit.xml.dist
- '.github/workflows/**'
workflow_dispatch:
jobs:
main:
name: Build and test
strategy:
matrix:
php-versions: ['8.2']
db-platforms: ['MySQLi']
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer, pecl, phpunit
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
coverage: xdebug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
- name: Test with PHPUnit
run: script -e -c "vendor/bin/phpunit -v --coverage-text"
env:
DB: ${{ matrix.db-platforms }}
TERM: xterm-256color