Skip to content

Commit

Permalink
chore: switch CI to GitHub Actions (TestableIO#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher authored Jul 19, 2020
1 parent f94186c commit 838c66a
Show file tree
Hide file tree
Showing 138 changed files with 94 additions and 112 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Continuous Integration
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET Core 2.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "2.1.x"
- name: Install .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Merge installed .NET SDKs
shell: pwsh
run: |
$version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
$root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
$directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
foreach ($dir in $directories) {
$from = $dir.FullName;
$to = "$root/$version";
Write-Host Copying from $from to $to;
Copy-Item "$from\*" $to -Recurse -Force;
}
- name: Run tests
run: dotnet test --verbosity normal
pack:
name: Pack
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Create packages
run: dotnet pack --configuration Release --output ./packages
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: NuGet packages
path: packages/*.*
deploy:
name: Deploy
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: [pack]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: NuGet packages
path: packages
- name: Push packages
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- uses: dotnet/[email protected]
id: nbgv
- name: Create GitHub release
uses: actions/create-release@v1
with:
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
release_name: v${{ steps.nbgv.outputs.SemVer2 }}
28 changes: 0 additions & 28 deletions .vscode/launch.json

This file was deleted.

15 changes: 0 additions & 15 deletions .vscode/tasks.json

This file was deleted.

5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<Authors>Tatham Oddie &amp; friends</Authors>
<SignAssembly Condition="'$(Configuration)' == 'Release'">True</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)StrongName.snk</AssemblyOriginatorKeyFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DefineConstants Condition="'$(TargetFramework)' == 'netcoreapp3.0' OR '$(TargetFramework)' == 'netstandard2.1'">$(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.1.91">
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.7-beta">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SauceControl.InheritDoc" Version="1.0.0" PrivateAssets="all" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions System.IO.Abstractions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
StrongName.snk = StrongName.snk
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.TestingHelpers.Tests", "System.IO.Abstractions.TestingHelpers.Tests\System.IO.Abstractions.TestingHelpers.Tests.csproj", "{20B02738-952A-40F5-9C10-E2F83013E9FC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.TestingHelpers.Tests", "tests\System.IO.Abstractions.TestingHelpers.Tests\System.IO.Abstractions.TestingHelpers.Tests.csproj", "{20B02738-952A-40F5-9C10-E2F83013E9FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions", "System.IO.Abstractions\System.IO.Abstractions.csproj", "{B7DA254D-496F-4C50-969C-CF925758E2ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions", "src\System.IO.Abstractions\System.IO.Abstractions.csproj", "{B7DA254D-496F-4C50-969C-CF925758E2ED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.TestingHelpers", "System.IO.Abstractions.TestingHelpers\System.IO.Abstractions.TestingHelpers.csproj", "{0103D32A-6124-4A1A-AD6C-30EB957F09B0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.TestingHelpers", "src\System.IO.Abstractions.TestingHelpers\System.IO.Abstractions.TestingHelpers.csproj", "{0103D32A-6124-4A1A-AD6C-30EB957F09B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.Benchmarks", "System.IO.Abstractions.Benchmarks\System.IO.Abstractions.Benchmarks.csproj", "{015B3812-E01D-479C-895D-BDDF16E798CA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.Benchmarks", "benchmarks\System.IO.Abstractions.Benchmarks\System.IO.Abstractions.Benchmarks.csproj", "{015B3812-E01D-479C-895D-BDDF16E798CA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
58 changes: 0 additions & 58 deletions appveyor.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<PackageTags>testing</PackageTags>
<IsPackable>false</IsPackable>
<IsTestable>false</IsTestable>
<OutputType>Exe</OutputType>
<OutputType>Exe</OutputType>
<OutputType>Exe</OutputType>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\System.IO.Abstractions\System.IO.Abstractions.csproj" />
<ProjectReference Include="../../src/System.IO.Abstractions/System.IO.Abstractions.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageTags>testing</PackageTags>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\System.IO.Abstractions\System.IO.Abstractions.csproj" />
<ProjectReference Include="../System.IO.Abstractions/System.IO.Abstractions.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<EmbeddedResource Include="TestFiles\TestFile.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../System.IO.Abstractions/System.IO.Abstractions.csproj" />
<ProjectReference Include="../System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj" />
<ProjectReference Include="../../src/System.IO.Abstractions/System.IO.Abstractions.csproj" />
<ProjectReference Include="../../src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
Expand Down

0 comments on commit 838c66a

Please sign in to comment.