Skip to content

chore(ci): align test jobs with mise tasks#563

Open
einarwar wants to merge 1 commit into
mainfrom
chore/ci-align-test-jobs-with-mise
Open

chore(ci): align test jobs with mise tasks#563
einarwar wants to merge 1 commit into
mainfrom
chore/ci-align-test-jobs-with-mise

Conversation

@einarwar
Copy link
Copy Markdown
Contributor

Make the test jobs use the same mise-action + setup-uv + mise run <task> pattern already established by the mypy and typescript-compile jobs in linting-and-checks.yaml, so local mise run <task> and CI behave identically.

Changes

  • Add .mise/tasks/test.toml with a test:api:unit task (cd api && uv run pytest --unit, depends on install-dependencies:api).
  • Rewrite api-unit-tests to use mise-action + setup-uv + mise run test:api:unit.
  • Rewrite docs-tests to use mise-action + setup-uv + mise run docs:build (existing task). Renamed the misleading "Checkout GitHub Action" step name and dropped the commented-out fetch-depth/if lines.
  • Drop unused CR_SECRET workflow_call input — it was declared but never referenced in the file, and no caller passes it.
  • Move API_IMAGE env into the api-integration-tests job (its only consumer).
  • Rename dead WEB_IMAGE to NGINX_IMAGE in the (currently disabled) web-tests job, matching the image actually published by publish-image.yaml (ghcr.io/equinor/template-fastapi-react/nginx). Scoped to that job.

Notes / out of scope

  • Considered also dropping the mypy / typescript-compile jobs as redundant with pre-commit, but .pre-commit-config.yaml does not include mypy or tsc — so those jobs are not redundant. Dismissed.
  • Considered converting the raw docker pull + docker build steps in api-integration-tests / web-tests to docker/build-push-action. Deferred to a follow-up PR that will also cover publish-image.yaml.
  • web-tests remains if: \${{ false }} (separate cleanup item).

Make api-unit-tests and docs-tests use the same mise-action + setup-uv pattern already established by the mypy and typescript-compile jobs in linting-and-checks.yaml, so local `mise run <task>` and CI behave identically.

- Add .mise/tasks/test.toml with a test:api:unit task (cd api && uv run pytest --unit; depends on install-dependencies:api).

- Rewrite api-unit-tests to use mise-action + setup-uv + mise run test:api:unit.

- Rewrite docs-tests to use mise-action + setup-uv + mise run docs:build (existing task); rename misleading 'Checkout GitHub Action' step.

- Drop unused CR_SECRET workflow_call input (never referenced; no caller passes it).

- Move API_IMAGE env into api-integration-tests job (only consumer); rename dead WEB_IMAGE to NGINX_IMAGE in (currently disabled) web-tests to match the image actually published by publish-image.yaml.
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.

1 participant