Merge branch 'master' into dev

This commit is contained in:
tgstation-server
2024-01-29 21:42:34 +00:00
4 changed files with 114 additions and 119 deletions
+3 -3
View File
@@ -60,11 +60,11 @@ You must also have the following environment variables set. To run them more acc
For the full CI gambit, the following repository configuration must be set:
- Setting `Workflow Permissions` to `Read and write permissions`: Enables CodeQL uploads and GitHub Actions comments.
- Setting `Workflow Permissions` to `Read and write permissions`: Enables GitHub Actions comments.
![image](https://github.com/tgstation/tgstation-server/assets/8171642/ab17fa74-364f-4e66-b7c4-b9bb24c6a599)
- Label `CI Cleared`: To allow PRs from forks to run CI with secrets after approval.
- Variable `TGS_ENABLE_CODE_QL` to `true`: Enables CodeQL scanning in actions.
- Integration [CodeCov](https://github.com/apps/codecov): Enables CodeCov status checks.
- Secret `CI_STATUSES_TOKEN`: A GitHub token with read access to the repository's contents/actions and write access to the repository's checks/security events. Used to create CI completion statuses.
- Secret `CODECOV_TOKEN`: A CodeCov repo token to work around https://github.com/codecov/codecov-action/issues/837.
- Secret `LIVE_TESTS_TOKEN`: A GitHub token with read access to the repository and write access to https://github.com/Cyberboss/common_core (TODO: Make the target repository here configurable). Despite it's name, it may be used across the entire test suite.
- Secret `TGS_TEST_DISCORD_TOKEN`: See above note about test environment variables.
@@ -74,7 +74,7 @@ For the full CI gambit, the following repository configuration must be set:
If you don't plan on deploying TGS, the following secrets can be omitted:
- Secret `DEV_PUSH_TOKEN`: A GitHub token with write access to the repository. Enables doxygen pushes to `gh-pages` branch, and releases creation.
- Secret `DEV_PUSH_TOKEN`: A GitHub token with read/write access to the repository. Enables doxygen pushes to `gh-pages` branch, and releases creation.
- Secret `DOCKER_USERNAME`: Login username for Docker image push.
- Secret `DOCKER_PASSWORD`: Login password for Docker image push.
- Secret `NUGET_API_KEY`: Nuget.org API Key for client libraries push.
+110 -64
View File
@@ -81,6 +81,36 @@ jobs:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
code-scanning:
name: Code Scanning
needs: start-ci-run-gate
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
token: ${{ secrets.CI_STATUSES_TOKEN }}
- name: Build
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:csharp"
token: ${{ secrets.CI_STATUSES_TOKEN }}
dmapi-build:
name: Build DMAPI
needs: start-ci-run-gate
@@ -206,10 +236,20 @@ jobs:
git checkout ${{ matrix.committish }}
git submodule update --init --recursive
- name: Restore OpenDream
run: |
cd $HOME/OpenDream
dotnet restore
- name: Build OpenDream
run: |
cd $HOME/OpenDream/OpenDreamPackageTool
dotnet build -c Release --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly
- name: Create TGS Deployment
run: |
cd $HOME/OpenDream
dotnet run -c Release --project OpenDreamPackageTool --property WarningLevel=0 -- --tgs -o tgs_deploy
dotnet run -c Release --project OpenDreamPackageTool --no-build -- --tgs -o tgs_deploy
- name: Build DMAPI
run: |
@@ -357,7 +397,7 @@ jobs:
run: sudo dotnet test --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" --filter TestCategory!=RequiresDatabase -c ${{ matrix.configuration }}NoWindows --collect:"XPlat Code Coverage" --settings build/ci.runsettings --results-directory ./TestResults tgstation-server.sln
- name: Store Code Coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-unit-test-coverage-${{ matrix.configuration }}
path: ./TestResults/
@@ -408,7 +448,7 @@ jobs:
run: dotnet test --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" --filter TestCategory!=RequiresDatabase -c ${{ matrix.configuration }}NoWix --collect:"XPlat Code Coverage" --settings build/ci.runsettings --results-directory ./TestResults tgstation-server.sln
- name: Store Code Coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-unit-test-coverage-${{ matrix.configuration }}
path: ./TestResults/
@@ -540,14 +580,14 @@ jobs:
- name: Store Live Tests Output
if: ${{ steps.live-tests.outputs.succeeded == 'YES' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-integration-test-logs-${{ matrix.configuration }}-${{ matrix.watchdog-type }}-${{ matrix.database-type }}
path: ./test_output.txt
- name: Store Errored Live Tests Output
if: ${{ steps.live-tests.outputs.succeeded != 'YES' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: errored-windows-test-logs-${{ matrix.configuration }}-${{ matrix.watchdog-type }}-${{ matrix.database-type }}
path: ./test_output.txt
@@ -557,14 +597,14 @@ jobs:
run: exit 1
- name: Store Code Coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-integration-test-coverage-${{ matrix.configuration }}-${{ matrix.watchdog-type }}-${{ matrix.database-type }}
path: ./TestResults/
- name: Store OpenAPI Spec
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'SqlServer' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: openapi-spec
path: C:/tgs_api.json
@@ -583,7 +623,7 @@ jobs:
- name: Store Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ServerService
path: artifacts/Service/
@@ -733,7 +773,7 @@ jobs:
dotnet test -c ${{ matrix.configuration }}NoWindows --filter TestCategory=RequiresDatabase --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" --no-build --collect:"XPlat Code Coverage" --settings ../../build/ci.runsettings --results-directory ../../TestResults
- name: Store Code Coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-integration-test-coverage-${{ matrix.configuration }}-${{ matrix.watchdog-type }}-${{ matrix.database-type }}
path: ./TestResults/
@@ -761,14 +801,14 @@ jobs:
- name: Store Server Console
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'MariaDB' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ServerConsole
path: artifacts/Console/
- name: Store Server Update Package
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'PostgresSql' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ServerUpdatePackage
path: artifacts/ServerUpdate/
@@ -793,7 +833,7 @@ jobs:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Retrieve OpenAPI Spec
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openapi-spec
path: ./swagger
@@ -818,235 +858,235 @@ jobs:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Retrieve Linux Unit Test Coverage (Debug)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-unit-test-coverage-Debug
path: ./code_coverage/unit_tests/linux_unit_tests_debug
- name: Retrieve Linux Unit Test Coverage (Release)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-unit-test-coverage-Release
path: ./code_coverage/unit_tests/linux_unit_tests_release
- name: Retrieve Linux Integration Test Coverage (Release, Advanced, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-Sqlite
path: ./code_coverage/integration_tests/linux_integration_tests_release_system_sqlite
- name: Retrieve Linux Integration Test Coverage (Release, Advanced, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-PostgresSql
path: ./code_coverage/integration_tests/linux_integration_tests_release_system_mariadb
- name: Retrieve Linux Integration Test Coverage (Release, Advanced, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-MariaDB
path: ./code_coverage/integration_tests/linux_integration_tests_release_system_mysql
- name: Retrieve Linux Integration Test Coverage (Release, Advanced, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-MySql
path: ./code_coverage/integration_tests/linux_integration_tests_release_system_mysql
- name: Retrieve Linux Integration Test Coverage (Release, Basic, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-Sqlite
path: ./code_coverage/integration_tests/linux_integration_tests_release_basic_sqlite
- name: Retrieve Linux Integration Test Coverage (Release, Basic, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-PostgresSql
path: ./code_coverage/integration_tests/linux_integration_tests_release_basic_mariadb
- name: Retrieve Linux Integration Test Coverage (Release, Basic, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-MariaDB
path: ./code_coverage/integration_tests/linux_integration_tests_release_basic_mysql
- name: Retrieve Linux Integration Test Coverage (Release, Basic, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Release-Advanced-MySql
path: ./code_coverage/integration_tests/linux_integration_tests_release_basic_mysql
- name: Retrieve Linux Integration Test Coverage (Debug, Advanced, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-Sqlite
path: ./code_coverage/integration_tests/linux_integration_tests_debug_system_sqlite
- name: Retrieve Linux Integration Test Coverage (Debug, Advanced, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-PostgresSql
path: ./code_coverage/integration_tests/linux_integration_tests_debug_system_mariadb
- name: Retrieve Linux Integration Test Coverage (Debug, Advanced, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-MariaDB
path: ./code_coverage/integration_tests/linux_integration_tests_debug_system_mysql
- name: Retrieve Linux Integration Test Coverage (Debug, Advanced, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-MySql
path: ./code_coverage/integration_tests/linux_integration_tests_debug_system_mysql
- name: Retrieve Linux Integration Test Coverage (Debug, Basic, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-Sqlite
path: ./code_coverage/integration_tests/linux_integration_tests_debug_basic_sqlite
- name: Retrieve Linux Integration Test Coverage (Debug, Basic, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-PostgresSql
path: ./code_coverage/integration_tests/linux_integration_tests_debug_basic_mariadb
- name: Retrieve Linux Integration Test Coverage (Debug, Basic, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-MariaDB
path: ./code_coverage/integration_tests/linux_integration_tests_debug_basic_mysql
- name: Retrieve Linux Integration Test Coverage (Debug, Basic, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-integration-test-coverage-Debug-Advanced-MySql
path: ./code_coverage/integration_tests/linux_integration_tests_debug_basic_mysql
- name: Retrieve Windows Unit Test Coverage (Release)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-unit-test-coverage-Release
path: ./code_coverage/unit_tests/windows_unit_tests_release
- name: Retrieve Windows Integration Test Coverage (Debug, Basic, SqlServer)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Basic-SqlServer
path: ./code_coverage/integration_tests/windows_integration_tests_debug_basic_sqlserver
- name: Retrieve Windows Integration Test Coverage (Release, Basic, SqlServer)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Basic-SqlServer
path: ./code_coverage/integration_tests/windows_integration_tests_release_basic_sqlserver
- name: Retrieve Windows Integration Test Coverage (Debug, Advanced, SqlServer)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Advanced-SqlServer
path: ./code_coverage/integration_tests/windows_integration_tests_debug_system_sqlserver
- name: Retrieve Windows Integration Test Coverage (Release, Advanced, SqlServer)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Advanced-SqlServer
path: ./code_coverage/integration_tests/windows_integration_tests_release_system_sqlserver
- name: Retrieve Windows Integration Test Coverage (Debug, Basic, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Basic-MariaDB
path: ./code_coverage/integration_tests/windows_integration_tests_debug_basic_mariadb
- name: Retrieve Windows Integration Test Coverage (Release, Basic, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Basic-MariaDB
path: ./code_coverage/integration_tests/windows_integration_tests_release_basic_mariadb
- name: Retrieve Windows Integration Test Coverage (Debug, Advanced, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Advanced-MariaDB
path: ./code_coverage/integration_tests/windows_integration_tests_debug_system_mariadb
- name: Retrieve Windows Integration Test Coverage (Release, Advanced, MariaDB)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Advanced-MariaDB
path: ./code_coverage/integration_tests/windows_integration_tests_release_system_mariadb
- name: Retrieve Windows Integration Test Coverage (Debug, Basic, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Basic-MySql
path: ./code_coverage/integration_tests/windows_integration_tests_debug_basic_mysql
- name: Retrieve Windows Integration Test Coverage (Release, Basic, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Basic-MySql
path: ./code_coverage/integration_tests/windows_integration_tests_release_basic_mysql
- name: Retrieve Windows Integration Test Coverage (Debug, Advanced, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Advanced-MySql
path: ./code_coverage/integration_tests/windows_integration_tests_debug_system_mysql
- name: Retrieve Windows Integration Test Coverage (Release, Advanced, MySql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Advanced-MySql
path: ./code_coverage/integration_tests/windows_integration_tests_release_system_mysql
- name: Retrieve Windows Integration Test Coverage (Debug, Basic, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Basic-PostgresSql
path: ./code_coverage/integration_tests/windows_integration_tests_debug_basic_postgressql
- name: Retrieve Windows Integration Test Coverage (Release, Basic, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Basic-PostgresSql
path: ./code_coverage/integration_tests/windows_integration_tests_release_basic_postgressql
- name: Retrieve Windows Integration Test Coverage (Debug, Advanced, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Advanced-PostgresSql
path: ./code_coverage/integration_tests/windows_integration_tests_debug_system_postgressql
- name: Retrieve Windows Integration Test Coverage (Release, Advanced, PostgresSql)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Advanced-PostgresSql
path: ./code_coverage/integration_tests/windows_integration_tests_release_system_postgressql
- name: Retrieve Windows Integration Test Coverage (Debug, Basic, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Basic-Sqlite
path: ./code_coverage/integration_tests/windows_integration_tests_debug_basic_sqlite
- name: Retrieve Windows Integration Test Coverage (Release, Basic, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Basic-Sqlite
path: ./code_coverage/integration_tests/windows_integration_tests_release_basic_sqlite
- name: Retrieve Windows Integration Test Coverage (Debug, Advanced, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Debug-Advanced-Sqlite
path: ./code_coverage/integration_tests/windows_integration_tests_debug_system_sqlite
- name: Retrieve Windows Integration Test Coverage (Release, Advanced, Sqlite)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-integration-test-coverage-Release-Advanced-Sqlite
path: ./code_coverage/integration_tests/windows_integration_tests_release_system_sqlite
@@ -1156,7 +1196,7 @@ jobs:
run: tar cfJ tgstation-server-v${{ env.TGS_VERSION }}.debian.packaging.tar.xz tgstation-server_*
- name: Upload Packaging Archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packaging-debian
path: tgstation-server-v${{ env.TGS_VERSION }}.debian.packaging.tar.xz
@@ -1287,7 +1327,7 @@ jobs:
}
- name: Upload Unsigned Installer .exe
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packaging-preview-windows
path: build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle/bin/Release/tgstation-server-installer.exe
@@ -1331,12 +1371,18 @@ jobs:
ci-completion-gate: # This job exists so there isn't a moving target for branch protections
name: CI Completion Gate
needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ]
needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template, code-scanning ]
runs-on: ubuntu-latest
if: (!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success')
steps:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
- name: Create Completion Check
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23
with:
token: ${{ secrets.CI_STATUSES_TOKEN }}
name: CI Completion
conclusion: success
output: |
{"summary":"The CI Pipeline completed successfully"}
deployment-gate:
name: Deployment Start Gate
@@ -1376,7 +1422,7 @@ jobs:
echo "TGS_API_VERSION=$apiVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Retrieve OpenAPI Spec
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openapi-spec
path: swagger
@@ -1602,37 +1648,37 @@ jobs:
echo "MARIADB_VERSION=$mariaDBVerison" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload .msi
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packaging-windows-raw-msi
path: build/package/winget/Tgstation.Server.Host.Service.Wix/bin/Release/en-US/tgstation-server.msi
- name: Retrieve Server Service
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ServerService
path: ServerService
- name: Retrieve Server Console
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ServerConsole
path: ServerConsole
- name: Retrieve Server Update Package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ServerUpdatePackage
path: ServerUpdatePackage
- name: Retrieve OpenAPI Spec
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openapi-spec
path: swagger
- name: Retrieve Debian Packaging Archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packaging-debian
path: packaging-debian
@@ -1876,7 +1922,7 @@ jobs:
run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes
- name: Retrieve Server Service
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packaging-windows-raw-msi
path: artifacts
-51
View File
@@ -1,51 +0,0 @@
name: 'Code Scanning'
on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
- master
env:
TGS_DOTNET_VERSION: 8
TGS_DOTNET_QUALITY: ga
concurrency:
group: "code-scanning-${{ github.head_ref || github.run_id }}-${{ github.event_name }}"
cancel-in-progress: true
jobs:
analyze:
name: Code Scanning
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
if: ${{ vars.TGS_ENABLE_CODE_QL }} == 'true'
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
- name: Build
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:csharp"
@@ -883,7 +883,7 @@ The user account that created this pull request is available to correct any issu
var results = await RLR(() => apiCall(apiOptions));
var distinctEntries = new Dictionary<string, T>(results.Count);
foreach (var result in results)
distinctEntries.Add(idSelector(result).ToString(), result);
distinctEntries.TryAdd(idSelector(result).ToString(), result);
if (results.Count > 100)
{