0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

phpunitをGitHubActions化する方法

Last updated at Posted at 2021-12-18

概要


プロジェクトでphpunitの自動化テストをGitHubActionsで自動化したので紹介します

https://phpunit.de/

やり方

.github/workflows/main.yml
name: CodeCheck

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: docker-compose up
      run: |
        # docker-compose build
        docker-compose up -d
    - name: composer install
      run: |
        docker-compose exec -T laravel bash -c "composer install"
    - name: phpunit
      run: |
        docker-compose exec -T laravel bash -c "php vendor/bin/phpunit"

mainブランチにPRを投げるとテストが実行される


0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?