Skip to content

phoenixframework/phoenix

Back Run integration tests on host runner in CI (#6831)

Commit details

Run integration tests on host runner in CI (#6831)

Description

* Run integration tests on host runner in CI Migrate the `integration-test-elixir` workflow job from an Alpine Docker container to run directly on the `ubuntu-24.04` host runner using `erlef/setup-beam`, matching the environment of `mix_test`, `installer_test`, and `docs`. Key benefits: - Adds `actions/cache` for `integration_test/deps` and `integration_test/_build` keyed on `integration_test/mix.lock`. This avoids recompiling ~50 dependencies on every CI run, saving ~50s of setup time on warm caches. - Eliminates the `apk add` system package installation step, as build tools are pre-installed on the Ubuntu runner image. - Removes background `socat` proxy bridges; GitHub Actions binds database service container ports directly to `localhost`. * Mount installer/tmp on tmpfs in integration tests CI Integration tests generate temporary Phoenix applications into `installer/tmp`, repeatedly copying dependencies, build artifacts, and compilation output across concurrent tests. Using an in-memory `tmpfs` should reduce I/O latency by running all file writes, recursive dependency copies, and test app compilations directly in RAM. Considerations: Standard GitHub-hosted Linux runners provide 16GB RAM and 4 vCPUs. Peak tmpfs usage for up to 8 concurrent test apps may reach ~2GB (each app consuming ~250MB). A 4GB tmpfs limit provides some headroom while guaranteeing enough free RAM for the host OS, BEAM, and database containers (PostgreSQL, MySQL, MSSQL).

Metadata

Author
Rodolfo Carvalho rhcarvalho@gmail.com
Committed
Commit

Contributors

  • Rodolfo Carvalho rhcarvalho@gmail.com Author