From f8dc5cbf2eb8376bb0972d6d925e587ed5ff2b2b Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Wed, 14 Aug 2024 22:52:07 +0200 Subject: [PATCH] Use composite action for integration test setup --- .../prepare-integration-test/action.yml | 18 ++++++++++++++++++ .github/workflows/integrationtests.yml | 18 ++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 .github/actions/prepare-integration-test/action.yml diff --git a/.github/actions/prepare-integration-test/action.yml b/.github/actions/prepare-integration-test/action.yml new file mode 100644 index 000000000..cd8bda0e8 --- /dev/null +++ b/.github/actions/prepare-integration-test/action.yml @@ -0,0 +1,18 @@ +name: 'PerpareIntegratoinTestAction' +description: 'Perpare for running integration test' +inputs: + dotnet-version: + description: '.NET SDK version(s) to use. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx' + required: true +runs: + using: "composite" + steps: + - name: Download build artifact + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 + with: + name: NuGet Package + path: ./BuildArtifacts/Packages/NuGet + - name: Install .NET + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4 + with: + dotnet-version: ${{ inputs.dotnet-version }} \ No newline at end of file diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index c92c2076e..e46b29c63 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -52,13 +52,8 @@ jobs: steps: - name: Get the sources uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - name: Download build artifact - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 - with: - name: NuGet Package - path: ./BuildArtifacts/Packages/NuGet - - name: Install .NET - uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4 + - name: Prepare integration tests + uses: ./.github/actions/prepare-integration-test with: dotnet-version: ${{ matrix.dotnet }} - name: Run integration tests @@ -81,13 +76,8 @@ jobs: steps: - name: Get the sources uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - name: Download build artifact - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 - with: - name: NuGet Package - path: ./BuildArtifacts/Packages/NuGet - - name: Install .NET - uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4 + - name: Prepare integration tests + uses: ./.github/actions/prepare-integration-test with: dotnet-version: ${{ matrix.dotnet }} - name: Run integration tests