-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e31fd5
commit 85c0798
Showing
36 changed files
with
1,854 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build-windows: | ||
|
||
runs-on: windows-2022 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install SonarCloud scanner for .NET | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.11 | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~\sonar\cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache SonarCloud scanner | ||
id: cache-sonar-scanner | ||
uses: actions/cache@v1 | ||
with: | ||
path: .\.sonar\scanner | ||
key: ${{ runner.os }}-sonar-scanner | ||
restore-keys: ${{ runner.os }}-sonar-scanner | ||
- name: Install SonarCloud scanner | ||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | ||
shell: powershell | ||
run: | | ||
New-Item -Path .\.sonar\scanner -ItemType Directory | ||
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner | ||
# Determine current version | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.7 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Determine Version | ||
uses: gittools/actions/gitversion/execute@v0.9.7 | ||
|
||
# Restore NuGet packages | ||
- name: Setup NuGet | ||
uses: NuGet/setup-nuget@v1 | ||
with: | ||
nuget-version: '5.x' | ||
- name: Restore NuGet Packages | ||
run: nuget restore ldap-filter-to-lambda-expression.sln | ||
|
||
# Prepare SonarCloud | ||
- name: Prepare SonarCloud | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
shell: powershell | ||
run: | | ||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"AxaFrance_ldap-filter-to-lambda-expression" /o:"axaguildev" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vstest.reportsPaths=./TestResults/*.trx /d:sonar.cs.opencover.reportsPaths=./**/coverage.opencover.xml /d:sonar.coverage.exclusions=./test/**/*.* /d:sonar.verbose=true | ||
# Build solution | ||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1.1 | ||
- name: Build | ||
run: | | ||
msbuild ldap-filter-to-lambda-expression.sln | ||
# Run Tests | ||
# - name: Run Tests | ||
# uses: microsoft/vstest-action@v1.0.0 | ||
# with: | ||
# testAssembly: | | ||
# **/*Tests.dll | ||
# searchFolder: ./test/ | ||
# runInParallel: true | ||
# codeCoverageEnabled: false | ||
|
||
- uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '6.x' | ||
- run: dotnet test ./test/AxaFrance.LdapFiltersToLambdaExpression.Tests/AxaFrance.LdapFiltersToLambdaExpression.Tests.csproj --collect:"XPlat Code Coverage" --settings coverlet.runsettings | ||
|
||
- name: Complete SonarCloud | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
shell: powershell | ||
run: | | ||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release packages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-windows: | ||
|
||
runs-on: windows-2022 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Determine current version | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.7 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/execute@v0.9.7 | ||
|
||
# Restore NuGet packages | ||
- name: Setup NuGet | ||
uses: NuGet/setup-nuget@v1 | ||
with: | ||
nuget-version: '5.x' | ||
- name: Restore NuGet Packages | ||
run: nuget restore ldap-filter-to-lambda-expression.sln | ||
|
||
# Build solution | ||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1.1 | ||
- name: Build | ||
run: | | ||
msbuild ldap-filter-to-lambda-expression.sln | ||
- run: dotnet pack -o nuget /p:ContinuousIntegrationBuild=true -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} -c Release ./src/AxaFrance.LdapFiltersToLambdaExpression/AxaFrance.LdapFiltersToLambdaExpression.csproj | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: packages | ||
path: | | ||
nuget/*.nupkg | ||
nuget/*.snupkg | ||
- name: Publish Nuget to GitHub registry | ||
run: dotnet nuget push 'nuget/AxaFrance.LdapFiltersToLambdaExpression.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg' -k ${{ secrets.NUGET_TOKEN }} -s 'https://api.nuget.org/v3/index.json' --skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, we pledge to respect all | ||
people who contribute through reporting issues, posting feature requests, | ||
updating documentation, submitting pull requests or patches, and other | ||
activities. | ||
|
||
We are committed to making participation in this project a harassment-free | ||
experience for everyone, regardless of level of experience, gender, gender | ||
identity and expression, sexual orientation, disability, personal appearance, | ||
body size, race, age, or religion. | ||
|
||
Examples of unacceptable behavior by participants include the use of sexual | ||
language or imagery, derogatory comments or personal attacks, trolling, public | ||
or private harassment, insults, or other unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct. Project maintainers who do not | ||
follow the Code of Conduct may be removed from the project team. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by opening an issue or contacting one or more of the project | ||
maintainers. | ||
|
||
This Code of Conduct is adapted from the | ||
[Contributor Covenant](http://contributor-covenant.org), version 1.0.0, | ||
available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# How to Contribute | ||
|
||
## Reporting Issues [WIP] | ||
|
||
Should you run into issues with the project, please don't hesitate to let us know by | ||
[filing an issue](https://github.com/AxaFrance/efcore-sqlexpressions/issues/new). | ||
|
||
Pull requests containing only failing tests demonstrating the issue are welcomed | ||
and this also helps ensure that your issue won't regress in the future once it's fixed. | ||
|
||
## Pull Requests | ||
|
||
We accept pull requests! | ||
|
||
Generally we like to see pull requests that: | ||
|
||
- Build | ||
- Maintain the [existing code style](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions) | ||
- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) | ||
- Have good commit messages. We use the [angular commit convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit) | ||
- Have tests | ||
- Don't decrease the current code coverage | ||
|
||
If you add a new feature, make sure it is tested, and documented: | ||
- In the code samples | ||
- In the [README.md](./README.md) | ||
|
||
We use [GithubFlow](https://guides.github.com/introduction/flow/) to manage our branches. | ||
|
||
## Running tests [WIP] | ||
|
||
|
||
<!-- Insert your instructions here --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.