v0.3.2

Documentation version

v0.2.4v0.3.2
en

Documentation language

en

Search documentation

ESC

Documentation search

What are you working on?

Find a guide, configuration option, action, or ESH topic.

Browse documentation
DocsFit workflows to a repository

Fit workflows to a repository

Keep tasks together while they are easy to find. Add structure when people need to run work from different parts of the repository or when a group of tasks deserves its own name.

Start in the root workspace

Put work that applies to the whole repository in .evin/workspace.flow:

workspace:
  name: storefront
  version: "1.0.0"

stages: [Check, Test, Build]

tasks:
  verify:
    stage: Check
    description: "Run the repository checks"
    run: npm run verify

From the repository root, run evin run verify. Root tasks run from that directory by default, so repository-wide commands can use the paths they already expect.

Use a module for a project area

A module is useful when a directory has its own commands and should be runnable from that directory. For example, apps/web/.evin/module.flow can define frontend tasks:

module:
  name: web

tasks:
  test:
    stage: Test
    description: "Test the web app"
    run: npm test

  build:
    stage: Build
    needs: [test]
    run: npm run build

Declare the module directory in the root workspace's modules list:

workspace:
  name: storefront
  version: "1.0.0"
  modules: [apps/web]

Then run evin run web:build. Evin runs the module's tasks from apps/web, and the needs relationship makes the tests pass before the build starts. A module does not need to mirror every folder; use one when the project area has work people want to run on its own.

A namespace keeps related tasks addressable together without giving them a separate working directory. This works well for maintenance or release tasks that operate on the root repository:

# .evin/maintenance.flow
namespace:
  name: maintenance
  description: "Repository maintenance workflows"

tasks:
  audit:
    stage: Check
    description: "Audit project dependencies"
    run: npm audit

Include the namespace file from .evin/workspace.flow:

workspace:
  name: storefront
  version: "1.0.0"
  include: [.evin/maintenance.flow]

Run its task as evin run maintenance:audit. The namespace gives the task a clear name; it still runs from the root workspace. Use a module when the directory should define the task's working location, and a namespace when you want to group names in the same workspace.

Keep the layout simple until ownership or repeated use calls for more files. For path discovery, include rules, and module or namespace field details, see the workspace, module, and namespace references.

Next: configure repository policy and environment.

Page source: book/40.fit-workflows-to-a-repository.md