Skip to content

Commit

Permalink
Merge pull request #401 from nanasess/upload-evidence
Browse files Browse the repository at this point in the history
E2Eテスト失敗時にエビデンスを保存する
  • Loading branch information
ryo-endo committed Jun 22, 2020
2 parents d3bfe12 + cddc4bb commit 40db851
Showing 1 changed file with 39 additions and 7 deletions.
46 changes: 39 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ jobs:
chromedriver-version: 2.43

- name: Run to PHPUnit
run: data/vendor/bin/phpunit --exclude-group classloader
- name: Run to PHPUnit classloader
run: data/vendor/bin/phpunit --group classloader
- name: Run to PHPUnit SessionFactory
run: |
data/vendor/bin/phpunit --exclude-group classloader
data/vendor/bin/phpunit --group classloader
sed 's|http://|https://|g' -i.bak data/config/config.php
data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php
mv data/config/config.php.bak data/config/config.php
- run: mv data/config/config.php.bak data/config/config.php

- name: Run chromedriver
run: |
Expand All @@ -131,9 +133,18 @@ jobs:
php data/vendor/bin/codecept build
php -S 0.0.0.0:8085 -t html/ &
php data/vendor/bin/codecept run --env chrome --skip-group installer --steps
- name: Failure log
- name: Upload evidence
if: failure()
run: tail -n 300 data/logs/*
uses: actions/upload-artifact@v2
with:
name: linux-php${{ matrix.php }}-${{ matrix.db }}-evidence
path: ctests/_output/
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: linux-php${{ matrix.php }}-${{ matrix.db }}-logs
path: data/logs

run-on-windows:
name: Run on Windows
Expand Down Expand Up @@ -197,11 +208,19 @@ jobs:
shell: bash

- name: Run to PHPUnit
run: data/vendor/bin/phpunit --exclude-group classloader
- name: Run to PHPUnit classloader
run: data/vendor/bin/phpunit --group classloader
- name: Run to PHPUnit SessionFactory
run: |
data/vendor/bin/phpunit --exclude-group classloader
data/vendor/bin/phpunit --group classloader
sed 's|http://|https://|g' -i.bak data/config/config.php
data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: windows-php${{ matrix.php }}-${{ matrix.db }}-logs
path: data\logs

install-to-linux:
name: Install to Linux
Expand Down Expand Up @@ -324,6 +343,19 @@ jobs:
php -S 0.0.0.0:8085 -t html/ &
php data/vendor/bin/codecept run --env chrome --group installer --steps acceptance InstallerCept
- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
with:
name: install-linux-php${{ matrix.php }}-evidence
path: ctests/_output/
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: install-linux-php${{ matrix.php }}-logs
path: html/install/temp/

deploy:
name: Deploy
runs-on: ubuntu-18.04
Expand Down

0 comments on commit 40db851

Please sign in to comment.