From 51af06aab95a6edc94987c738855ca46cc089ebc Mon Sep 17 00:00:00 2001 From: atlas-athena Date: Sun, 13 Aug 2023 11:52:03 +0000 Subject: [PATCH] :robot: feat(ci): update from atlas.workflows(4990479104bd1a53839e2315325d1a09ae280aa1) --- .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 00000000000..7d757e82b95 --- /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 00000000000..2c161a0fee1 --- /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 + } + ] + } + ] +}