Skip to content

GitHub Actions Integration #2

@9ssi7

Description

@9ssi7

Requirements

  • CLI tool for execution
  • Yaml parser for pre-defined structure config

End case

want to have this action yml

# .github/workflows/go-arctest.yml
name: Architecture Test

on: [push, pull_request]

jobs:
  check-architecture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Run go-arctest
        uses: mstrYoda/go-arctest@v1
        with:
          config: '.github/arctest-config.yml'

with config (just idea)

# .github/arctest-config.yml
layers:
  - name: Domain
    pattern: "^domain/.*$"
  - name: Application
    pattern: "^application/.*$"
  - name: Infrastructure
    pattern: "^infrastructure/.*$"
  - name: Presentation
    pattern: "^presentation/.*$"

rules:
  - from: Application
    to: Domain
  - from: Infrastructure
    to: Domain
  - from: Infrastructure
    to: Application
  - from: Presentation
    to: Domain
  - from: Presentation
    to: Application
  - from: Presentation
    to: Infrastructure

ref: https://docs.github.com/en/actions/sharing-automations/creating-actions/about-custom-actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions