-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
191 additions
and
2 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,17 @@ | ||
# Description | ||
|
||
_Please explain the changes you've made_ | ||
|
||
## Issue reference | ||
|
||
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation. | ||
|
||
Please reference the issue this PR will close: #_[issue number]_ | ||
|
||
## Checklist | ||
|
||
Please make sure you've completed the relevant tasks for this PR, out of the following list: | ||
|
||
* [ ] Code compiles correctly | ||
* [ ] Created/updated tests | ||
* [ ] Extended the documentation |
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,66 @@ | ||
name: Codecov | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: codecov | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: git pull | ||
uses: actions/checkout@v2 | ||
|
||
- name: run a one-line script | ||
run: env | ||
|
||
- name: Configure sysctl limits | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
- 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 | ||
run: | | ||
dotnet tool install --global dotnet-sonarscanner | ||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: | | ||
dotnet-sonarscanner begin /k:"BlazorComponent_MASA.Blazor.Extensions" /o:"blazorcomponent" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet build /p:ContinuousIntegrationBuild=true | ||
dotnet test --no-build --verbosity normal --collect "Code Coverage" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.Tests]*" | ||
dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
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,35 @@ | ||
name: Package Push Nuget | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
package-build: | ||
name: package build and push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git pull | ||
uses: actions/checkout@v2 | ||
|
||
- name: run a one-line script | ||
run: env | ||
|
||
- name: setting dotnet version | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
include-prerelease: true | ||
|
||
- name: restore | ||
run: dotnet restore | ||
|
||
- name: build | ||
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true | ||
|
||
- name: pack | ||
run: dotnet pack --include-symbols -p:PackageVersion=$GITHUB_REF_NAME | ||
|
||
- name: package push | ||
run: dotnet nuget push "**/*.symbols.nupkg" -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json | ||
|
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,68 @@ | ||
name: PR_Run_Test_CI | ||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: PR_Run_Test_CI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: git pull | ||
uses: actions/checkout@v2 | ||
|
||
- name: run a one-line script | ||
run: env | ||
|
||
- name: setting dotnet version | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
include-prerelease: true | ||
|
||
- name: Configure sysctl limits | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
- 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 | ||
run: | | ||
dotnet tool install --global dotnet-sonarscanner | ||
- name: Build and analyze for SonarCloud | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
if: ${{ env.SONAR_TOKEN != '' }} | ||
run: | | ||
dotnet-sonarscanner begin /k:"BlazorComponent_MASA.Blazor.Extensions" /o:"blazorcomponent" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet build /p:ContinuousIntegrationBuild=true | ||
dotnet test --no-build --verbosity normal --collect "Code Coverage" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.Tests]*" | ||
dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | ||
- name: Build and analyze for Codecov | ||
run: | | ||
dotnet build /p:ContinuousIntegrationBuild=true | ||
dotnet test --no-build --verbosity normal --collect "Code Coverage" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.Tests]*" | ||
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