Discord Botの修正 #127
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
phpunit: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0.30 | |
ports: | |
- 3306:3306 | |
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: test | |
env: | |
DB_CONNECTION: mysql | |
DB_HOST: 127.0.0.1 | |
DB_PORT: 3306 | |
DB_DATABASE: test | |
DB_USERNAME: root | |
DB_PASSWORD: root | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache vendor | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: ./vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
coverage: none | |
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M | |
- name: composer install | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: composer install | |
- name: composer dump autoload | |
run: composer dump-autoload | |
- name: storage link | |
run: php artisan storage:link | |
- name: migrate | |
run: php artisan migrate --env=testing | |
- name: test | |
run: ./vendor/bin/phpunit --testdox --colors=always |