From 255e6e6c17bfb484fad6e85ef8da5f99a3224c60 Mon Sep 17 00:00:00 2001 From: Dor-bl Date: Thu, 17 Sep 2026 10:38:50 +0200 Subject: [PATCH] ci: create env.json before build in functional tests MSBuild's Condition="Exists('env.json')" for the CopyToOutputDirectory item is evaluated during dotnet build, so creating env.json after the build step (and running tests with --no-build) meant it never made it into bin/Release/net8.0, failing test setup with a missing file error. --- .github/workflows/functional-test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index daeeeaad..a4ada3c0 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -94,12 +94,6 @@ jobs: appium driver install uiautomator2 appium driver install espresso - - name: Restore dependencies - run: dotnet restore Appium.Net.sln - - - name: Build solution - run: dotnet build Appium.Net.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore - - name: Create test environment file run: | cat > ./test/integration/env.json << 'EOF' @@ -110,6 +104,12 @@ jobs: } EOF + - name: Restore dependencies + run: dotnet restore Appium.Net.sln + + - name: Build solution + run: dotnet build Appium.Net.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore + - name: Run Android functional tests uses: reactivecircus/android-emulator-runner@v2 with: @@ -194,12 +194,6 @@ jobs: wait_for_boot: true shutdown_after_job: false - - name: Restore dependencies - run: dotnet restore Appium.Net.sln - - - name: Build solution - run: dotnet build Appium.Net.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore - - name: Create test environment file run: | cat > ./test/integration/env.json << 'EOF' @@ -210,6 +204,12 @@ jobs: } EOF + - name: Restore dependencies + run: dotnet restore Appium.Net.sln + + - name: Build solution + run: dotnet build Appium.Net.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore + - name: Run iOS functional tests env: LOCAL_PREBUILT_WDA: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app