OSDN Git Service

OpenTween.Testsプロジェクトの依存関係を更新
[opentween/open-tween.git] / appveyor.yml
1 version: 3.5.0.{build}
2
3 os: Visual Studio 2022
4
5 environment:
6   matrix:
7     - RELEASE_TAG: 'false'
8     - RELEASE_TAG: 'true'
9
10 configuration:
11   - Debug
12   - Release
13
14 matrix:
15   exclude:
16     - RELEASE_TAG: 'false'
17       configuration: Release
18     - RELEASE_TAG: 'true'
19       configuration: Debug
20
21 branches:
22   only:
23     - develop
24     - /^OpenTween.+/ # release tag
25
26 for:
27   - # for dev build
28     matrix:
29       only:
30         - RELEASE_TAG: 'false'
31     skip_tags: true
32     assembly_info:
33       patch: true
34       file: OpenTween\Properties\AssemblyInfo.cs
35       assembly_version: '{version}'
36     artifacts:
37       - name: OpenTween.zip
38         path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip
39       - name: OpenTween.pdb
40         path: OpenTween.pdb
41   - # for release build
42     matrix:
43       only:
44         - RELEASE_TAG: 'true'
45     skip_non_tags: true
46     artifacts:
47       - name: OpenTween.zip
48         path: $(APPVEYOR_REPO_TAG_NAME).zip
49       - name: OpenTween.pdb
50         path: OpenTween.pdb
51
52 build:
53   project: OpenTween.sln
54   verbosity: minimal
55
56 cache:
57   - '%UserProfile%\.nuget\packages -> OpenTween\OpenTween.csproj, OpenTween.Tests\OpenTween.Tests.csproj'
58
59 init:
60   - git config --global core.autocrlf true
61
62 before_build:
63   - nuget restore
64
65 test_script:
66   - cmd: |
67       set altCoverVersion=8.6.61
68       set xunitVersion=2.4.2
69       set targetFramework=net48
70       set nugetPackages=%UserProfile%\.nuget\packages
71
72       %nugetPackages%\altcover\%altCoverVersion%\tools\net472\AltCover.exe --inputDirectory .\OpenTween.Tests\bin\%CONFIGURATION%\%targetFramework%\ --outputDirectory .\__Instrumented\ --assemblyFilter "?^OpenTween(?!\.Tests)" --typeFilter "?^OpenTween\." --fileFilter "\.Designer\.cs" --visibleBranches
73
74       %nugetPackages%\altcover\%altCoverVersion%\tools\net472\AltCover.exe runner --recorderDirectory .\__Instrumented\ --executable %nugetPackages%\xunit.runner.console\%xunitVersion%\tools\net472\xunit.console.exe -- .\__Instrumented\OpenTween.Tests.dll
75
76 after_test:
77   - ps: |
78       Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
79       .\codecov.exe -f coverage.xml
80   - ps: |
81       $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\'
82       $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net48\'
83       if ($env:RELEASE_TAG -eq 'true') {
84         $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip'
85       } else {
86         $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip'
87       }
88       if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) {
89         $headCommit = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT
90       } else {
91         $headCommit = 'HEAD'
92       }
93       .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit
94       Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\'
95
96 # vim: et fenc=utf-8 sts=2 sw=2 ts=2