OSDN Git Service

GraphQL関連のリクエストにPostJsonRequestクラスを使用する
[opentween/open-tween.git] / appveyor.yml
index 47dd0f9..1893d88 100644 (file)
@@ -1,6 +1,6 @@
-version: 2.5.0.{build}
+version: 3.9.0.{build}
 
-os: Visual Studio 2019
+os: Visual Studio 2022
 
 environment:
   matrix:
@@ -18,6 +18,11 @@ matrix:
     - RELEASE_TAG: 'true'
       configuration: Debug
 
+branches:
+  only:
+    - develop
+    - /^OpenTween.+/ # release tag
+
 for:
   - # for dev build
     matrix:
@@ -45,32 +50,34 @@ build:
   verbosity: minimal
 
 cache:
-  - ./packages/
+  - '%UserProfile%\.nuget\packages -> OpenTween\OpenTween.csproj, OpenTween.Tests\OpenTween.Tests.csproj'
 
 init:
   - git config --global core.autocrlf true
 
 before_build:
   - nuget restore
-  - choco install opencover.portable
+  - ps: Set-Content .\msbuild.rsp "/warnaserror /p:DebugType=None"
 
-test_script:
-  - OpenCover.Console.exe -register -target:"%xunit20%\xunit.console.exe" -targetargs:".\OpenTween.Tests\bin\%CONFIGURATION%\net472\OpenTween.Tests.dll -noshadow -appveyor" -filter:"+[OpenTween*]* -[OpenTween.Tests]*" -excludebyfile:"*.Designer.cs" -skipautoprops -hideskipped:All -returntargetcode -output:coverage.xml
+test:
+  assemblies:
+    only:
+      - OpenTween.Tests.dll
 
 after_test:
-  - npm install codecov --save
-  - ./node_modules/.bin/codecov -f coverage.xml
-
   - ps: |
-      $env:PATH = $env:PATH + ';C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\'
-      $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\'
-      $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\'
-      $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs'
+      $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\'
+      $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net48\'
       if ($env:RELEASE_TAG -eq 'true') {
         $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip'
       } else {
         $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip'
       }
-      .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath
+      if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) {
+        $headCommit = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT
+      } else {
+        $headCommit = 'HEAD'
+      }
+      .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit
 
 # vim: et fenc=utf-8 sts=2 sw=2 ts=2