Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change how the project is organized and release an alpha version #26

Merged
merged 8 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!src
!tests
**/bin
**/obj
!AspNetCore.RestFramework.sln
!scripts/*.sh
40 changes: 40 additions & 0 deletions .github/workflows/pr.yml
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
33 changes: 33 additions & 0 deletions .github/workflows/publish-coverage.yml
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
29 changes: 29 additions & 0 deletions .github/workflows/publish-package.yml
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 AspNetCore.RestFramework.Core/AspNetCore.RestFramework.Core.csproj

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions AspNetCore.RestFramework.Sample/Context/ApplicationDbContext.cs

This file was deleted.

This file was deleted.

41 changes: 0 additions & 41 deletions AspNetCore.RestFramework.Sample/Controllers/CustomersController.cs

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions AspNetCore.RestFramework.Sample/Controllers/SellersController.cs

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions AspNetCore.RestFramework.Sample/DTO/CustomerDocumentDto.cs

This file was deleted.

18 changes: 0 additions & 18 deletions AspNetCore.RestFramework.Sample/DTO/CustomerDto.cs

This file was deleted.

Loading