Skip to content

ci: create env.json before build in functional tests - #1130

Merged
Dor-bl merged 1 commit into
appium:mainfrom
Dor-bl:fix/functional-test-env-json-order
Sep 19, 2026
Merged

Dor-bl merged 1 commit into
appium:mainfrom
Dor-bl:fix/functional-test-env-json-order

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

PR title

ci: — no new label required.

Related issue

Closes # n/a

List of changes

  • In .github/workflows/functional-test.yml, move the "Create test environment file" step before "Build solution" in both the android-tests and ios-tests jobs.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Refactoring (non-breaking change that improves code without altering functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • New test coverage (non-breaking change that adds tests for existing, previously untested functionality)
  • Test fix (non-breaking change that improves test stability or correctness)
  • Chore/Maintenance (updates to build scripts, dependencies, or GitHub Actions)

Tests

  • Unit tests
  • Integration tests
  • No automated tests (explain why below)

How they run: This is a CI workflow ordering fix; it's exercised by the existing functional-test.yml runs themselves (Android/iOS jobs) rather than by unit/integration tests.

Documentation

  • Not applicable (no user-facing behaviour change, e.g. tests, CI or maintenance only)

Details

The android-tests and ios-tests jobs in functional-test.yml ran dotnet build before the "Create test environment file" step wrote test/integration/env.json. The integration test csproj has:

<None Update="env.json" Condition="Exists('env.json')">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

Condition="Exists('env.json')" is evaluated at build time, so when env.json doesn't exist yet during dotnet build, the item is excluded from the project and never copied to bin/Release/net8.0. Since the test step then runs with --no-build, the file is never copied later either, producing:

Error initializing environment: Could not find file '.../test/integration/bin/Release/net8.0/env.json'.

Fix: create env.json before dotnet build runs so it exists when the project is evaluated and gets copied to the output directory as intended.

Reference failing run: https://github.com/Dor-bl/dotnet-client/actions/runs/35195002624/job/105116041898#step:15:91

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.
Copilot AI lite review requested due to automatic review settings September 17, 2026 08:39
@github-actions github-actions Bot added the CI label Sep 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Moves env.json creation before restore/build in Android and iOS functional-test jobs.

Changes:

  • Reorders environment-file creation before restore/build.
  • Applies the fix to both functional-test jobs.
File summaries
File Description
.github/workflows/functional-test.yml Reorders CI steps in both functional-test jobs.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Dor-bl
Dor-bl merged commit f038562 into appium:main Sep 19, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants