Skip to content

Commit 838c66a

Browse files
authored
chore: switch CI to GitHub Actions (#589)
1 parent f94186c commit 838c66a

138 files changed

Lines changed: 94 additions & 112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Continuous Integration
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
test:
9+
name: Test
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Install .NET Core 2.1 SDK
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: "2.1.x"
24+
- name: Install .NET Core 3.1 SDK
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: "3.1.x"
28+
- name: Merge installed .NET SDKs
29+
shell: pwsh
30+
run: |
31+
$version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
32+
$root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
33+
$directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
34+
foreach ($dir in $directories) {
35+
$from = $dir.FullName;
36+
$to = "$root/$version";
37+
Write-Host Copying from $from to $to;
38+
Copy-Item "$from\*" $to -Recurse -Force;
39+
}
40+
- name: Run tests
41+
run: dotnet test --verbosity normal
42+
pack:
43+
name: Pack
44+
needs: [test]
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout sources
48+
uses: actions/checkout@v2
49+
with:
50+
fetch-depth: 0
51+
- name: Install .NET Core 3.1 SDK
52+
uses: actions/setup-dotnet@v1
53+
with:
54+
dotnet-version: "3.1.x"
55+
- name: Create packages
56+
run: dotnet pack --configuration Release --output ./packages
57+
- name: Upload a Build Artifact
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: NuGet packages
61+
path: packages/*.*
62+
deploy:
63+
name: Deploy
64+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
65+
needs: [pack]
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/download-artifact@v2
69+
with:
70+
name: NuGet packages
71+
path: packages
72+
- name: Push packages
73+
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
74+
- uses: dotnet/nbgv@v0.3.1
75+
id: nbgv
76+
- name: Create GitHub release
77+
uses: actions/create-release@v1
78+
with:
79+
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
80+
release_name: v${{ steps.nbgv.outputs.SemVer2 }}

.vscode/launch.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

Directory.Build.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
<Authors>Tatham Oddie &amp; friends</Authors>
66
<SignAssembly Condition="'$(Configuration)' == 'Release'">True</SignAssembly>
77
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)StrongName.snk</AssemblyOriginatorKeyFile>
8+
<IncludeSymbols>true</IncludeSymbols>
9+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
810
<DefineConstants Condition="'$(TargetFramework)' == 'netcoreapp3.0' OR '$(TargetFramework)' == 'netstandard2.1'">$(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS</DefineConstants>
911
</PropertyGroup>
1012
<ItemGroup>
11-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.1.91">
13+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.7-beta">
1214
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1315
<PrivateAssets>all</PrivateAssets>
1416
</PackageReference>
17+
<PackageReference Include="SauceControl.InheritDoc" Version="1.0.0" PrivateAssets="all" />
1518
</ItemGroup>
1619
</Project>

System.IO.Abstractions.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
StrongName.snk = StrongName.snk
1010
EndProjectSection
1111
EndProject
12-
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}"
12+
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}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions", "System.IO.Abstractions\System.IO.Abstractions.csproj", "{B7DA254D-496F-4C50-969C-CF925758E2ED}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions", "src\System.IO.Abstractions\System.IO.Abstractions.csproj", "{B7DA254D-496F-4C50-969C-CF925758E2ED}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.TestingHelpers", "System.IO.Abstractions.TestingHelpers\System.IO.Abstractions.TestingHelpers.csproj", "{0103D32A-6124-4A1A-AD6C-30EB957F09B0}"
16+
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}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Abstractions.Benchmarks", "System.IO.Abstractions.Benchmarks\System.IO.Abstractions.Benchmarks.csproj", "{015B3812-E01D-479C-895D-BDDF16E798CA}"
18+
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}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution

appveyor.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

System.IO.Abstractions.Benchmarks/FileSystemAbstractionBenchmarks.cs renamed to benchmarks/System.IO.Abstractions.Benchmarks/FileSystemAbstractionBenchmarks.cs

File renamed without changes.
File renamed without changes.

System.IO.Abstractions.Benchmarks/Properties/launchSettings.json renamed to benchmarks/System.IO.Abstractions.Benchmarks/Properties/launchSettings.json

File renamed without changes.

System.IO.Abstractions.Benchmarks/Support/DirectorySupport.cs renamed to benchmarks/System.IO.Abstractions.Benchmarks/Support/DirectorySupport.cs

File renamed without changes.

0 commit comments

Comments
 (0)