Skip to content

Smoke testing when updating dependencies (and doing PR's) - #11

Merged
hakan-persson merged 3 commits into
mainfrom
smoke-testing
May 6, 2026
Merged

Smoke testing when updating dependencies (and doing PR's)#11
hakan-persson merged 3 commits into
mainfrom
smoke-testing

Conversation

@hakan-persson

Copy link
Copy Markdown
Member

A summary of what is added:

New files:

  • tests/conftest.py — Sets env vars before any app imports, provides a session-scoped TestClient fixture with scoutnet_init/scoutnet_shutdown mocked
  • tests/test_smoke.py — 5 smoke tests: app boots, /metrics, /app-config, /api/docs, /api/openapi.json
  • .github/workflows/ci.yml — CI workflow triggered on pushes to deps/** and PRs to main

Modified files:

  • pyproject.toml — Added [dependency-groups] dev = ["pytest>=8"] and [tool.pytest.ini_options]

How it fits together: create-pull-request pushes to the deps/update-uv-lock branch before creating the PR. That push triggers ci.yml (via the push: deps/** trigger), so CI results appear on the PR before you merge.

Copilot AI review requested due to automatic review settings April 6, 2026 13:14

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.

Pull request overview

Adds a lightweight CI smoke-test gate for dependency update pull requests, ensuring the FastAPI app boots and key endpoints respond after lockfile upgrades.

Changes:

  • Added pytest-based smoke tests with a session-scoped TestClient fixture that mocks external Scoutnet init/shutdown and disables auth.
  • Introduced a new GitHub Actions CI workflow to run the smoke tests on deps/** branch pushes and PRs targeting main.
  • Added a dev dependency group for pytest and updated uv.lock accordingly.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Adds dev/test tooling dependencies (pytest and its transitive deps) to the lockfile.
pyproject.toml Defines a dev dependency group and pytest discovery settings.
tests/conftest.py Sets env vars early and provides a mocked, session-scoped FastAPI TestClient fixture.
tests/test_smoke.py Adds endpoint-level smoke tests for app boot and key routes.
.github/workflows/update-dependencies.yml Updates dependency-update automation action versions and PR metadata.
.github/workflows/ci.yml New workflow to install dev deps and run pytest smoke tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/conftest.py Outdated
Comment thread .github/workflows/ci.yml
Comment thread pyproject.toml Outdated
@hakan-persson
hakan-persson merged commit 3558b84 into main May 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants