Skip to content

Commit

Permalink
Merge origin/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
turbcool committed Mar 30, 2023
1 parent 35e2270 commit 96d4f53
Show file tree
Hide file tree
Showing 524 changed files with 27,472 additions and 20,815 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text eol=lf

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
*.bmp binary
*.png binary
229 changes: 229 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop-v5.2 branch
push:
branches: [ develop, 'release*' ]
pull_request:
branches: [ develop, 'release*' ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
XUNIT_RUNNER: "2.4.1"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-postgres"
build-postgres:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: flexberry/alt.p8-postgresql-postgis
# Provide the password for postgres
env:
POSTGRES_PASSWORD: p@ssw0rd
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
ConnectionStringPostgres: "SERVER=localhost;User ID=postgres;Password=p@ssw0rd;Port=5432;"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v2

# Several .NET Core versions will be used during the test run.
# The lowest version gets installed first in order to prevent
# "a newer version is already installed" install errors.

- name: Install .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

# Building requires an up-to-date .NET SDK.

- name: Install .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Install .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

- name: NuGet Restore
run: dotnet restore "Flexberry ORM.sln"

- name: Install xunit.runner.console
run: nuget install xunit.runner.console -Version $XUNIT_RUNNER -OutputDirectory testrunner

- name: Compile code
run: dotnet build --no-restore -v q /p:WarningLevel=0 -c Debug "Flexberry ORM.sln"

- name: Test on dotnet 3.1
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/netcoreapp3.1/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test on dotnet 6.0
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net6.0/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test on dotnet 7.0
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net7.0/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test under mono
run: mono ./testrunner/xunit.runner.console.$XUNIT_RUNNER/tools/net461/xunit.console.exe ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net461/NewPlatform.Flexberry.ORM.Tests.dll

- name: Integration test on dotnet 6.0
run: dotnet test ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net6.0/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Integration test on dotnet 7.0
run: dotnet test ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net7.0/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Integration test under mono
run: mono ./testrunner/xunit.runner.console.$XUNIT_RUNNER/tools/net461/xunit.console.exe ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net461/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Cleanup
if: always()
run: |
rm -Rf .ssh .github *
# This workflow contains a single job called "build-mssql"
build-mssql:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
mssql:
# Docker Hub image
image: mcr.microsoft.com/mssql/server:2019-latest
# Provide the password for mssql
env:
ACCEPT_EULA: Y
SA_PASSWORD: p@ssw0rd
# Set health checks to wait until mssql has started
options: >-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ${SA_PASSWORD} -Q 'SELECT 1' -b -o /dev/null"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 1433 on service container to the host
- 1433:1433
env:
ConnectionStringMssql: "SERVER=localhost;User ID=sa;Password=p@ssw0rd;"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Several .NET Core versions will be used during the test run.
# The lowest version gets installed first in order to prevent
# "a newer version is already installed" install errors.

- name: Install .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

# Building requires an up-to-date .NET SDK.

- name: Install .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Install .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

- name: NuGet Restore
run: dotnet restore "Flexberry ORM.sln"

- name: Install xunit.runner.console
run: nuget install xunit.runner.console -Version $XUNIT_RUNNER -OutputDirectory testrunner

- name: Compile code
run: dotnet build --no-restore -v q /p:WarningLevel=0 -c Debug "Flexberry ORM.sln"

- name: Test on dotnet 3.1
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/netcoreapp3.1/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test on dotnet 6.0
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net6.0/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test on dotnet 7.0
run: dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net7.0/NewPlatform.Flexberry.ORM.Tests.dll

- name: Test under mono
run: mono ./testrunner/xunit.runner.console.$XUNIT_RUNNER/tools/net461/xunit.console.exe ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net461/NewPlatform.Flexberry.ORM.Tests.dll

- name: Integration test on dotnet 6.0
run: dotnet test ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net6.0/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Integration test on dotnet 7.0
run: dotnet test ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net7.0/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Integration test under mono
run: mono ./testrunner/xunit.runner.console.$XUNIT_RUNNER/tools/net461/xunit.console.exe ./NewPlatform.Flexberry.ORM.IntegratedTests/bin/Debug/net461/NewPlatform.Flexberry.ORM.IntegratedTests.dll

- name: Cleanup
if: always()
run: |
rm -Rf .ssh .github *
# This workflow contains a single job called "doxygen"
doxygen:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Requiring dependent jobs to be successful
needs: [build-postgres, build-mssql]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install apt-get packages
run: sudo apt-get install -y doxygen

- name: Tune ssh-keys
env:
PRIVATE_KEY: ${{ secrets.OPENSSH_PRIVATE_KEY }}
run: |
set -x
export PRIVATE_KEY
# Setup SSH agent
export SSH_AUTH_SOCK=/tmp/ssh_agent.sock
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
# Start ssh agent
ssh-agent -a $SSH_AUTH_SOCK #> /dev/null
ssh-add - <<< "${PRIVATE_KEY}"
- name: Update documentation
run: |
[ $GITHUB_EVENT_NAME == 'push' ] &&
( [ $GITHUB_REF == "refs/heads/master" ] || [ $GITHUB_REF == "refs/heads/develop" ] ) &&
bash Doxygen/update-autodoc.sh
exit 0
- name: Cleanup
if: always()
run: |
rm -Rf .ssh .github *
49 changes: 49 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: SonarCloud
on:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- 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
- name: Build and analyze
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:"Flexberry_NewPlatform.Flexberry.ORM" /o:"flexberry" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet restore "Flexberry ORM.sln"
dotnet build --no-restore -v q /p:WarningLevel=0 -c Debug "Flexberry ORM.sln"
dotnet test ./NewPlatform.Flexberry.ORM.Tests/bin/Debug/net6.0/NewPlatform.Flexberry.ORM.Tests.dll
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
**/.vs/
*.coverage
*.xml
*.cache

#Ignore thumbnails created by Windows
Thumbs.db

#Ignore files built by Visual Studio
*.user
*.user
*.suo
Loading

0 comments on commit 96d4f53

Please sign in to comment.