From 6ecccac1721cd8b0e3ad83c87e036ee3c0e97608 Mon Sep 17 00:00:00 2001 From: atlas-athena Date: Mon, 21 Aug 2023 09:18:18 +0000 Subject: [PATCH] feat(ci): update from atlas.workflows(f368e462afa152d1d51f5363a11cf6353a389e79) --- .github/workflows/formatter.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/matchers/black.json | 15 +++++++++++++++ 2 files changed, 41 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 0000000..7d757e8 --- /dev/null +++ b/.github/workflows/formatter.yaml @@ -0,0 +1,26 @@ +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" + jupyter: true diff --git a/.github/workflows/matchers/black.json b/.github/workflows/matchers/black.json new file mode 100644 index 0000000..2c161a0 --- /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 + } + ] + } + ] +}