Skip to content

Commit

Permalink
Merge 8dfc818 into 18aa863
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Jul 5, 2021
2 parents 18aa863 + 8dfc818 commit 22dccca
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 27 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- dev
- codecov-instead-of-sonar
pull_request:
branches:
- main
Expand All @@ -16,6 +17,8 @@ jobs:
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
fetch-depth: 0

- name: 🥅 Install .Net 5
uses: actions/setup-dotnet@v1
Expand All @@ -36,31 +39,10 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{github.workspace}}/codecover/lcov.info

analyze:
name: 🔍 Analyze sources (CI)
environment: CI - analyze environment
runs-on: ubuntu-latest
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0

- name: 🔍 Analyze code
uses: highbyte/sonarscan-dotnet@v2.1-beta
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: codecov/codecov-action@v1
with:
sonarOrganization: net-daemon
sonarProjectKey: net-daemon_netdaemon
sonarProjectName: netdaemon

dotnetTestArguments: --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
sonarBeginArguments: >-
/d:sonar.inclusions="**/src/**"
/d:sonar.test.inclusions="**/tests/**"
/d:sonar.cs.xunit.reportsPaths="**/tests/**/TestResults/*.trx"
/d:sonar.cs.opencover.reportsPaths="**/tests/**/coverage.opencover.xml"
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

74 changes: 74 additions & 0 deletions lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
##########################################################################################
# Customize file classifications. #
# Results from files under any classifier will be excluded from LGTM #
# statistics. #
##########################################################################################

##########################################################################################
# Use the `path_classifiers` block to define changes to the default classification of #
# files. #
##########################################################################################

path_classifiers:
test:
# Override LGTM's default classification of test files by excluding all files.
- exclude: /
# Classify all files in the top-level directories test/ and testsuites/ as test code.
- tests
# Classify all files with suffix `.test` as test code.
# Note: use only forward slash / as a path separator.
# Use ** to indicate an arbitrary parent path.
# Use * to indicate any sequence of characters excluding /.
# Always enclose the expression in double quotes if it includes *.
# - "**/*.test"
# Refine the classifications above by excluding files in test/util/.
- exclude: tests/integration
# The default behavior is to tag all files created during the
# build as `generated`. Results are hidden for generated code. You can tag
# further files as being generated by adding them to the `generated` section.

#########################################################################################
# Use the extraction block to define changes to the default code extraction process #
# for one or more languages. The settings for each language are defined in a child #
# block, with one or more steps. #
#########################################################################################

extraction:
# Define settings for C# analysis
##################################
csharp:
# The `prepare` step exists for customization on LGTM.com only.
# prepare:
# packages:
# - example_package
# Add an `after-prepare` step if you need to run commands after the `prepare` step.
# Each command should be listed on a separate line.
after_prepare:
- export PATH=$LGTM_WORKSPACE/tools:$PATH
# The `index` step builds the code and extracts information during the build
# process.
index:
# Specify that all project or solution files should be used for extraction.
# Default: false.
all_solutions: false
# Specify a list of one or more project or solution files for extraction.
# Default: LGTM chooses the file closest to the root of the repository (this may
# fail if there are multiple candidates).
solution:
- NetDaemon.sln
# Override the autobuild process by specifying a list of custom build commands
# to use instead.
# build_command:
# - dotnet ./example-compile-all.sh
# Specify .NET Core settings.
dotnet:
# Specify additional arguments to `dotnet build`.
# Default: empty.
arguments: "example_arg"
# Specify the version of .NET Core SDK to use.
# Default: The version installed on the build machine.
version: 5

# Specify whether or not to perform a NuGet restore for extraction. Default: true.
nuget_restore: true

0 comments on commit 22dccca

Please sign in to comment.