-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add linux PR gate * minor yml change * Pipeline test * Merge * test * Test * test * test
- Loading branch information
Showing
14 changed files
with
188 additions
and
35 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,62 @@ | ||
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: Pull Request (Linux) | ||
|
||
on: | ||
# push: | ||
# branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
name: PR build + test (Linux) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'csharp' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Add permission to run shell | ||
run: chmod -R +x *.sh | ||
|
||
- name: Restore dependencies | ||
run: ./build-restore.sh | ||
|
||
- name: Initialize CodeQL | ||
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. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
- name: Build | ||
run: ./build.sh | ||
|
||
- name: Test | ||
run: ./build-test.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
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,48 @@ | ||
#!/bin/bash | ||
|
||
if [ "${1,,}" == "/?" ] || [ "${1,,}" == "-?" ] || [ "${1,,}" == "--help" ]; then | ||
Usage | ||
fi | ||
|
||
ExitCode=0 | ||
|
||
echo "" | ||
echo "[Restoring NuGet Packages]" | ||
echo "--------------------------------------------------" | ||
dotnet restore "$(dirname "$0")/src/VirtualClient/VirtualClient.sln" "$1" | ||
result=$? | ||
if [ $result -ne 0 ]; then | ||
Error | ||
fi | ||
|
||
End | ||
|
||
Usage() { | ||
echo "" | ||
echo "Usage:" | ||
echo "---------------------" | ||
echo "$0 [--interactive]" | ||
echo "" | ||
echo "Examples:" | ||
echo "---------------------" | ||
echo "# Restore NuGet packages for all projects" | ||
echo "$0" | ||
echo "" | ||
echo "# Restore, allowing user to provide credentials" | ||
echo "$0 --interactive" | ||
Finish | ||
} | ||
|
||
Error() { | ||
ExitCode=$? | ||
End | ||
} | ||
|
||
End() { | ||
echo "Restore Stage Exit Code: $ExitCode" | ||
Finish | ||
} | ||
|
||
Finish() { | ||
exit $ExitCode | ||
} |
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,43 @@ | ||
#!/bin/bash | ||
|
||
ExitCode=0 | ||
|
||
Usage() { | ||
echo "" | ||
echo "Usage:" | ||
echo "---------------------" | ||
echo "$0" | ||
Finish | ||
} | ||
|
||
Error() { | ||
ExitCode=1 | ||
End | ||
} | ||
|
||
End() { | ||
echo "Test Stage Exit Code: $ExitCode" | ||
Finish | ||
} | ||
|
||
Finish() { | ||
exit $ExitCode | ||
} | ||
|
||
if [ "${1,,}" == "/?" ] || [ "${1,,}" == "-?" ] || [ "${1,,}" == "--help" ]; then | ||
Usage | ||
fi | ||
|
||
echo "" | ||
echo "[Running Tests]" | ||
echo "--------------------------------------------------" | ||
|
||
for file in $(find "$(dirname "$0")/src" -type f -name "*Tests.csproj"); do | ||
dotnet test -c Release "$file" --no-restore --no-build --filter "(Category=Unit|Category=Functional)" --logger "console;verbosity=normal" | ||
result=$? | ||
if [ $result -ne 0 ]; then | ||
Error | ||
fi | ||
done | ||
|
||
End |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.