Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2Eテスト失敗時にエビデンスを保存する #401

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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