Skip to content

Commit 90dd14a

Browse files
committed
Aligned repo structure with System.IO.Abstractions
1 parent caf6a92 commit 90dd14a

21 files changed

Lines changed: 373 additions & 270 deletions

.devcontainer/devcontainer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "C# (.NET Core)",
3+
"image": "mcr.microsoft.com/vscode/devcontainers/dotnet:5.0",
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/bin/bash"
6+
},
7+
"postCreateCommand": "dotnet restore"
8+
}

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://EditorConfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = CRLF
8+
9+
[*.cs]
10+
indent_style = space
11+
indent_size = 4
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'state: needs discussion, type: bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Additional context**
24+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'state: needs discussion, type: enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Continuous Integration
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
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: Setup .NET Core 2.1
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: "2.1.x"
24+
- name: Setup .NET Core 3.1
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: "3.1.x"
28+
- name: Setup .NET
29+
uses: actions/setup-dotnet@v1
30+
- name: Run tests
31+
run: dotnet test --collect:"XPlat Code Coverage" --logger "GitHubActions"
32+
- name: Upload coverage
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: Code coverage ${{ matrix.os }}
36+
path: "**/coverage.cobertura.xml"
37+
coverage:
38+
name: Coverage
39+
needs: [test]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout sources
43+
uses: actions/checkout@v2
44+
- name: Setup .NET
45+
uses: actions/setup-dotnet@v1
46+
- uses: actions/download-artifact@v2
47+
with:
48+
name: Code coverage ubuntu-latest
49+
path: coverage-ubuntu
50+
- uses: actions/download-artifact@v2
51+
with:
52+
name: Code coverage windows-latest
53+
path: coverage-windows
54+
- uses: actions/download-artifact@v2
55+
with:
56+
name: Code coverage macos-latest
57+
path: coverage-macos
58+
- name: Generate coverage report
59+
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.12
60+
with:
61+
reports: "**/coverage.cobertura.xml"
62+
targetdir: "coverage-report"
63+
reporttypes: "Cobertura"
64+
- name: Publish coverage report to Codacy
65+
uses: codacy/codacy-coverage-reporter-action@master
66+
if: github.repository == 'System-IO-Abstractions/System.IO.Abstractions.Extensions' && github.event_name == 'push'
67+
with:
68+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
69+
coverage-reports: coverage-report/Cobertura.xml
70+
pack:
71+
name: Pack
72+
needs: [test]
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout sources
76+
uses: actions/checkout@v2
77+
with:
78+
fetch-depth: 0
79+
- name: Setup .NET
80+
uses: actions/setup-dotnet@v1
81+
- name: Create packages
82+
run: dotnet pack --configuration Release --output ./packages
83+
- name: Upload a Build Artifact
84+
uses: actions/upload-artifact@v2
85+
with:
86+
name: NuGet packages
87+
path: packages/*.*
88+
# deploy:
89+
# name: Deploy
90+
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
91+
# needs: [pack]
92+
# runs-on: ubuntu-latest
93+
# steps:
94+
# - name: Checkout sources
95+
# uses: actions/checkout@v2
96+
# with:
97+
# fetch-depth: 0
98+
# - name: Setup .NET
99+
# uses: actions/setup-dotnet@v1
100+
# - uses: actions/download-artifact@v2
101+
# with:
102+
# name: NuGet packages
103+
# path: packages
104+
# - name: Push packages
105+
# run: dotnet nuget push "packages/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
106+
# - uses: dotnet/nbgv@v0.4.0
107+
# id: nbgv
108+
# - name: Create GitHub release
109+
# uses: actions/create-release@v1
110+
# env:
111+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
# with:
113+
# tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
114+
# release_name: v${{ steps.nbgv.outputs.SemVer2 }}
115+
# - name: Comment relevant issues and merge requests
116+
# uses: apexskier/github-release-commenter@v1.3.2
117+
# with:
118+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
# comment-template: |
120+
# This is addressed in release {release_link}.
121+
# label-template: |
122+
# state: released

.github/workflows/pr.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Pull Request"
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
jobs:
9+
main:
10+
name: Check PR title
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: amannn/action-semantic-pull-request@v3.4.0
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Directory.Build.props

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
<Project>
22
<PropertyGroup>
33
<AssemblyVersion>1.0.0</AssemblyVersion>
4+
<Product>System.IO.Abstractions.Extensions</Product>
5+
<Copyright>Copyright © Tatham Oddie - Luigi Grilli &amp; friends 2021</Copyright>
6+
<Authors>Tatham Oddie - Luigi Grilli &amp; friends</Authors>
7+
<SignAssembly Condition="'$(Configuration)' == 'Release'">True</SignAssembly>
8+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)StrongName.snk</AssemblyOriginatorKeyFile>
9+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
10+
<IncludeSymbols>true</IncludeSymbols>
11+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
412
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
8-
<Authors></Authors>
9-
<Product></Product>
10-
<PackageProjectUrl></PackageProjectUrl>
11-
<RepositoryUrl></RepositoryUrl>
13+
<LangVersion>9.0</LangVersion>
14+
<PackageTags>testing</PackageTags>
15+
<PackageProjectUrl>https://github.com/System-IO-Abstractions/System.IO.Abstractions.Extensions</PackageProjectUrl>
16+
<RepositoryUrl>https://github.com/System-IO-Abstractions/System.IO.Abstractions.Extensions.git</RepositoryUrl>
1217
<RepositoryType>git</RepositoryType>
1318
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
14-
<PackageLicenseExpression></PackageLicenseExpression>
15-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)key.snk</AssemblyOriginatorKeyFile>
16-
<SignAssembly>true</SignAssembly>
19+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
20+
<DefineConstants Condition="'$(TargetFramework)' == 'net5.0' OR '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'netstandard2.1'">$(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS;FEATURE_PATH_JOIN_WITH_SPAN</DefineConstants>
21+
<DefineConstants Condition="'$(TargetFramework)' == 'net5.0'">$(DefineConstants);FEATURE_FILE_MOVE_WITH_OVERWRITE</DefineConstants>
22+
<DefineConstants Condition="'$(TargetFramework)' == 'net5.0'">$(DefineConstants);FEATURE_SUPPORTED_OS_ATTRIBUTE</DefineConstants>
23+
<DefineConstants Condition="'$(TargetFramework)' == 'net5.0'">$(DefineConstants);FEATURE_FILE_SYSTEM_WATCHER_FILTERS</DefineConstants>
1724
</PropertyGroup>
25+
<ItemGroup>
26+
<PackageReference Include="System.IO.Abstractions" Version="13.*" />
27+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220">
28+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
29+
<PrivateAssets>all</PrivateAssets>
30+
</PackageReference>
31+
<PackageReference Include="SauceControl.InheritDoc" Version="1.3.0" PrivateAssets="all" />
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
33+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
34+
<PrivateAssets>all</PrivateAssets>
35+
</PackageReference>
36+
</ItemGroup>
1837
</Project>

0 commit comments

Comments
 (0)