Skip to content

管理者用のユーザー一覧画面の実装 #61

管理者用のユーザー一覧画面の実装

管理者用のユーザー一覧画面の実装 #61

name: Integration Test
on:
pull_request:
branches: ["*"]
jobs:
middleware:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testdatabase
env:
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: testdatabase
DB_USERNAME: root
DB_PASSWORD: password
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
- uses: actions/setup-node@v3
with:
node-version: 16.x
- uses: actions/checkout@v3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
working-directory: ./api
- name: Composer Install
run: composer install -n --prefer-dist
working-directory: ./api
- name: VCmposer Dump Autoload
run: composer dump-autoload
working-directory: ./api
- name: Generate key
run: php artisan key:generate
working-directory: ./api
- name: Initialize Database
run: |
php artisan migrate
php artisan db:seed
working-directory: ./api
- name: Run Laravel Server
run: php artisan serve > /dev/null 2>&1 &
working-directory: ./api
- name: Install Dependencies
run: npm install
working-directory: ./client
- name: Run Nuxt.js Server
run: npm run dev > /dev/null 2>&1 &
working-directory: ./client
- name: Install puppeteer
run: npm install puppeteer
- name: Run middleware test
id: middleware
run: |
node ./.github/workflows/test-middleware.js | tee results.txt
echo "results=$(cat results.txt)" >> $GITHUB_OUTPUT
- name: Create comment
uses: actions/github-script@v6
env:
RESULTS: ${{ steps.middleware.outputs.results }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('./.github/workflows/create-middleware-comment.js')
script({github, context})