From c56fe1cccb05e89b313cd66165d6144e26b34e92 Mon Sep 17 00:00:00 2001 From: atlas-athena Date: Fri, 11 Aug 2023 01:31:01 +0000 Subject: [PATCH] feat(ci): update from atlas.workflows(b97e27a81df9accd6ef0e4ea38b818c8a8500608) --- .github/workflows/formatter.yaml | 25 +++++++++++++++++++++++++ .github/workflows/matchers/black.json | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/formatter.yaml create mode 100644 .github/workflows/matchers/black.json diff --git a/.github/workflows/formatter.yaml b/.github/workflows/formatter.yaml new file mode 100644 index 000000000..9eb84ccff --- /dev/null +++ b/.github/workflows/formatter.yaml @@ -0,0 +1,25 @@ +name: Formatter + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + - feature/** + +jobs: + formatter: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Add a problem matcher + run: echo "::add-matcher::.github/workflows/matchers/black.json" + - name: Format + uses: psf/black@stable + with: + options: "--check --diff --color --line-length 120" diff --git a/.github/workflows/matchers/black.json b/.github/workflows/matchers/black.json new file mode 100644 index 000000000..2c161a0fe --- /dev/null +++ b/.github/workflows/matchers/black.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "black", + "severity": "error", + "pattern": [ + { + "regexp": "^(would reformat) (.+)$", + "file": 2, + "message": 1 + } + ] + } + ] +}