Linux Container Integration Tests #9
Workflow file for this run
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
name: Linux Container Integration Tests | |
on: | |
workflow_call: | |
inputs: | |
external_call: | |
type: boolean | |
default: true | |
required: false | |
workflow_dispatch: | |
inputs: | |
run_id: | |
description: 'Run ID of the build workflow (all_solutions.yml) to use the agent from. ID can be found in URL for run.' | |
required: true | |
env: | |
DOTNET_NOLOGO: true | |
NR_DEV_BUILD_HOME: false | |
# only allow one instance of this workflow to be running per PR or branch, cancels any that are already running | |
concurrency: | |
group: linux-container-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
run-x64-linux-container-tests: | |
name: Run x64 Linux Container Integration Tests | |
runs-on: ubuntu-latest | |
env: | |
test_results_path: tests\TestResults | |
integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared | |
NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1 | |
# Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources | |
enhanced_logging: false | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Download Agent Home Folders (Call) | |
if: ${{ inputs.external_call }} | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: homefolders | |
path: src/Agent | |
- name: Download Agent Home Folders (Dispatch) | |
if: ${{ !inputs.external_call }} | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ inputs.run_id }} | |
name: homefolders | |
path: ${{ github.workspace }}/src/Agent | |
repository: ${{ github.repository }} | |
- name: Set up secrets | |
env: | |
INTEGRATION_TEST_SECRETS: ${{ secrets.TEST_SECRETS }} | |
run: | | |
echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }} | |
- name: Install .NET 9 | |
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Build & Run x64 Linux Container Integration Tests | |
env: | |
BUILD_ARCH: x64 | |
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=x64 | |
run-arm64-linux-container-tests: | |
name: Run arm64 Linux Container Integration Tests | |
runs-on: ubuntu-24.04-arm | |
env: | |
test_results_path: tests\TestResults | |
integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared | |
NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1 | |
# Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources | |
enhanced_logging: false | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Download Agent Home Folders (Call) | |
if: ${{ inputs.external_call }} | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: homefolders | |
path: src/Agent | |
- name: Download Agent Home Folders (Dispatch) | |
if: ${{ !inputs.external_call }} | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ inputs.run_id }} | |
name: homefolders | |
path: ${{ github.workspace }}/src/Agent | |
repository: ${{ github.repository }} | |
- name: Set up secrets | |
env: | |
INTEGRATION_TEST_SECRETS: ${{ secrets.TEST_SECRETS }} | |
run: | | |
echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }} | |
- name: Install .NET 9 | |
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Build & Run arm64 Linux Container Integration Tests | |
env: | |
BUILD_ARCH: arm64 | |
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=arm64 | |