durandtibo/objectory

View on GitHub
.github/workflows/format.yaml

Summary

Maintainability
Test Coverage
name: Format
on:
  workflow_call:
  workflow_dispatch:  # to trigger manually

jobs:
  format:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install Poetry
        uses: snok/install-poetry@v1

      - name: Set environment variable
        run: |
          echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH

      - name: Install packages
        run: |
          make config-poetry
          make install-all

      - name: Show installed packages
        run: |
          poetry show
          poetry show --tree

      - name: Format
        run: |
          make format

      - name: Lint
        run: |
          make lint