Skip to content

Commit

Permalink
build: source dump
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-vandenbussche committed Jun 22, 2023
1 parent 7e31fd5 commit 85c0798
Show file tree
Hide file tree
Showing 36 changed files with 1,854 additions and 37 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/ldap-filter-to-lambda-expression.yml
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 }}"
51 changes: 51 additions & 0 deletions .github/workflows/release-packages-to-nuget.yml
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
54 changes: 19 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
Expand All @@ -13,23 +12,17 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand All @@ -43,10 +36,9 @@ Generated\ Files/
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUnit
# NUNIT
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Build Results of an ATL Project
[Dd]ebugPS/
Expand All @@ -60,14 +52,15 @@ BenchmarkDotNet.Artifacts/
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*_i.h
*.ilk
*.meta
*.obj
Expand All @@ -84,7 +77,6 @@ StyleCopReport.xml
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
Expand Down Expand Up @@ -127,6 +119,9 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

Expand Down Expand Up @@ -184,8 +179,6 @@ PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
Expand All @@ -210,14 +203,12 @@ BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
!*.[Cc]ache/

# Others
ClientBin/
Expand All @@ -230,7 +221,7 @@ ClientBin/
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

Expand Down Expand Up @@ -261,9 +252,6 @@ ServiceFabricBackup/
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl

# Microsoft Fakes
FakesAssemblies/
Expand Down Expand Up @@ -299,8 +287,12 @@ paket-files/
# FAKE - F# Make
.fake/

# CodeRush personal settings
.cr/personal
# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
Expand All @@ -325,7 +317,7 @@ __pycache__/
# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
Expand All @@ -334,17 +326,9 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
#SpecflowResult
**/TestExecution.json
*.feature.cs
28 changes: 28 additions & 0 deletions CODE_OF_CONDUCT.md
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/)
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
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 -->
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Axa France
Copyright (c) 2023 Axa France IARD / Axa France VIE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 85c0798

Please sign in to comment.