-
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.
feat: change how the project is organized and release an alpha version (
#26) * chore: change how projects are organized - Remove library `JSM.PartialJsonObject`. - Update Dockerfile. - Format some files given `docker compose up lint-formatter` execution. - Use net8.0 in all projects. - Remove `wait-for-it.sh` and use healthcheck in sqlserver service. * feat: remove sample project and configure tests - Add `Microsoft.AspNetCore.Mvc.NewtonsoftJson`. - `NewtonsoftJson` is required by the framework. - Use a new database for each test method to avoid race condition. - Use SqlServer instead of InMemory database * docs: add license file * chore(nuget): enable repeatable package restores using a lock file Know more at: - https://bit.ly/3QnsqTU * chore(ci/cd): add actions for pr, coverage, and package publication * chore: add project metadata * test: improve coverage * docs: translate readme to en-us and change some statements
- Loading branch information
1 parent
2569dd7
commit 89a7d0f
Showing
102 changed files
with
5,656 additions
and
2,771 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,7 @@ | ||
* | ||
!src | ||
!tests | ||
**/bin | ||
**/obj | ||
!AspNetCore.RestFramework.sln | ||
!scripts/*.sh |
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,40 @@ | ||
name: Validate PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- '*.sln' | ||
- 'Dockerfile' | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
- uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8' | ||
- name: Check if the project is well formatted | ||
run: | | ||
./scripts/start-check-formatting.sh | ||
- name: Install dotnet-sonarscanner | ||
run: | | ||
dotnet tool install --global dotnet-sonarscanner | ||
- name: Build the project, run all tests, and publish the test results | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
PR_SOURCE_BRANCH: ${{ github.head_ref }} | ||
PR_TARGET_BRANCH: ${{ github.base_ref }} | ||
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}} | ||
run: | | ||
set -e | ||
docker compose up -d db | ||
./scripts/start-sonarcloud.sh |
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 @@ | ||
name: Publish package and coverage report | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- '*.sln' | ||
- 'Directory.Build.props' | ||
|
||
jobs: | ||
publish-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
- name: Install dotnet-sonarscanner | ||
run: | | ||
dotnet tool install --global dotnet-sonarscanner | ||
- name: Build the project, run all tests and publish to SonarCloud | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
PROJECT_VERSION: ${{ github.sha }} | ||
SOURCE_BRANCH_NAME: ${{ github.ref_name }} | ||
run: | | ||
set -e | ||
docker compose up -d db | ||
./scripts/start-sonarcloud.sh |
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,29 @@ | ||
name: Publish coverage report | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+*' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Generate package | ||
run: | | ||
TAG_NAME=${GITHUB_REF#refs/tags/} | ||
dotnet pack -o out -p:PackageVersion=$TAG_NAME | ||
- name: Push package | ||
run: | | ||
dotnet nuget push out/*.nupkg \ | ||
--api-key ${{ secrets.PUBLIC_NUGET_API_KEY }} \ | ||
--source "https://api.nuget.org/v3/index.json" \ | ||
--skip-duplicate |
16 changes: 0 additions & 16 deletions
16
AspNetCore.RestFramework.Core/AspNetCore.RestFramework.Core.csproj
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
AspNetCore.RestFramework.Sample/AspNetCore.RestFramework.Sample.csproj
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
AspNetCore.RestFramework.Sample/Context/ApplicationDbContext.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
AspNetCore.RestFramework.Sample/Controllers/CustomerDocumentsController.cs
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
AspNetCore.RestFramework.Sample/Controllers/CustomersController.cs
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
AspNetCore.RestFramework.Sample/Controllers/IntAsIdEntitiesController.cs
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
AspNetCore.RestFramework.Sample/Controllers/SellersController.cs
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
AspNetCore.RestFramework.Sample/CustomSerializers/CustomerSerializer.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
AspNetCore.RestFramework.Sample/DTO/CustomerDocumentDto.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.