Skip to content

Commit

Permalink
Merge pull request #86 from mizrael/dev-v3
Browse files Browse the repository at this point in the history
V3
  • Loading branch information
mizrael authored Apr 22, 2023
2 parents ae1ba4c + a99a73a commit 49cc02f
Show file tree
Hide file tree
Showing 711 changed files with 5,662 additions and 24,621 deletions.
61 changes: 24 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ version: 2.1

jobs:
build:
resource_class: large

docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0.100-focal-amd64
- image: 'circleci/mongo:4.4.3'
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
- image: 'rabbitmq:3-management-alpine'
- image: mcr.microsoft.com/dotnet/sdk:7.0.100-alpine3.16-amd64
- image: mongo:latest
- image: rabbitmq:3-management-alpine
environment:
RABBITMQ_DEFAULT_VHOST: "/opensleigh"
- image: 'mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04'
- image: 'mcr.microsoft.com/mssql/server:2022-latest'
environment:
SA_PASSWORD: "Sup3r_p4ssword123"
ACCEPT_EULA: "Y"
Expand All @@ -35,14 +34,17 @@ jobs:
- run:
name: Build
command: |
cd ./src
dotnet build
- run:
name: Unit tests
command: |
command: |
cd ./src
dotnet test --filter "Category!=E2E&Category!=Integration"
- run:
name: Integration tests
command: |
command: |
cd ./src
dotnet test --filter "FullyQualifiedName!~Cosmos&Category=Integration"
#- run: # skipping E2E tests for now
Expand All @@ -51,16 +53,14 @@ jobs:
# dotnet test --filter "Category=E2E"

sonarscan:
resource_class: large
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0.100-focal-amd64
- image: 'circleci/mongo:4.4.3'
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
- image: mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim-amd64
- image: 'mongo:latest'
- image: 'rabbitmq:3-management-alpine'
environment:
RABBITMQ_DEFAULT_VHOST: "/opensleigh"
- image: 'mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04'
- image: 'mcr.microsoft.com/mssql/server:2022-latest'
environment:
SA_PASSWORD: "Sup3r_p4ssword123"
ACCEPT_EULA: "Y"
Expand All @@ -83,33 +83,20 @@ jobs:
- checkout

- run:
name: Install dependencies
command: |
apt-get update && apt-get install -y openjdk-13-jdk
name: run sonarcloud
command: |
export PATH="$PATH:/root/.dotnet/tools"
apt-get update && apt-get install -y default-jdk
dotnet tool install --global dotnet-sonarscanner
dotnet tool install --global coverlet.console
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> $BASH_ENV
- run:
name: Start Sonarcloud
command: |
dotnet sonarscanner begin \
dotnet tool install --global coverlet.console
dotnet-sonarscanner begin \
/k:"mizrael_OpenSleigh" \
/o:"mizrael" \
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.login="$SONAR_TOKEN" \
/d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"
- run:
name: Build and test
command: |
dotnet build
dotnet test --no-build --filter "FullyQualifiedName!~Cosmos&Category!=E2E" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=coverage.opencover.xml
- run:
name: Stop Sonarcloud
command: |
dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
/d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"
dotnet test ./src/OpenSleigh.sln --filter "FullyQualifiedName!~Cosmos&Category!=E2E" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=coverage.opencover.xml
dotnet-sonarscanner end /d:sonar.login="$SONAR_TOKEN"
workflows:
build_and_test:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -75,7 +75,9 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: dotnet build -c Release
- run: |
cd ./src
dotnet build -c Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
6 changes: 4 additions & 2 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
- name: Setup .NET Core @ Latest
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Generate NuGet packages
run: dotnet pack -c Release
run: |
cd ./src
dotnet pack -c Release
- name: Push packages to registry
run: |
Expand Down
Loading

0 comments on commit 49cc02f

Please sign in to comment.