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

[WIP] appveyor でテストに失敗した場合でも artifacts を収集できるようにする実験 #7

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

m-tmatma
Copy link
Member

appveyor でテストに失敗した場合でも artifacts を収集できるようにする実験

@m-tmatma
Copy link
Member Author

m-tmatma commented Nov 22, 2018

以下のコマンドを実行することにより、明示的にコマンドプロンプトから artifacts の
収集を行うことができる。

appveyor PushArtifact <file_name>

つまり、ビルドやテストに失敗しても好きなファイルを自由に artifacts の収集対象にすることができる。

参考サイト
https://help.appveyor.com/discussions/questions/1649-how-to-keep-a-build-artifact-when-tests-fail
https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts

@m-tmatma
Copy link
Member Author

実際のビルドの実例
https://ci.appveyor.com/project/sakuraeditor/sandbox/builds/20491221

該当する処理のコード

sandbox/appveyor.yml

Lines 12 to 21 in 19429d7

build_script:
- cmd: >-
echo PLATFORM %PLATFORM%
echo CONFIGURATION %CONFIGURATION%
echo "test" > test.txt
appveyor PushArtifact test.txt

sandbox/appveyor.yml

Lines 26 to 30 in 19429d7

test_script:
- cmd: >-
echo "test_script 2"
exit /b 1

30行目で、テストを失敗させている。
20行目で appveyor PushArtifact を呼んでいる。

結果を見ると artifacts の収集ができている。

@m-tmatma m-tmatma changed the title appveyor でテストに失敗した場合でも artifacts を収集できるようにする実験 [WIP] appveyor でテストに失敗した場合でも artifacts を収集できるようにする実験 Nov 22, 2018
@m-tmatma m-tmatma marked this pull request as draft August 19, 2020 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant