Skip to content

Commit 38f44a6

Browse files
committed
fix: rework black github action
1 parent 1693eee commit 38f44a6

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

.github/workflows/black.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: psf/black@stable

.github/workflows/test.yml

-24
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,7 @@ on:
1010
- cron: "0 1 * * *"
1111
workflow_dispatch:
1212
jobs:
13-
checks:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v1
18-
with:
19-
python-version: 3.8
20-
- name: Checkout code
21-
uses: actions/checkout@v2
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install ".[dev]"
26-
- name: Format with black
27-
run: |
28-
if ! RES=$(black --check $(git diff --name-only --diff-filter=AM master -- "*.py") 2>&1); then
29-
RES="${RES//'%'/'%25'}"
30-
RES="${RES//$'\n'/'%0A'}"
31-
RES="${RES//$'\r'/'%0D'}"
32-
echo "::error ::${RES}"
33-
exit 1
34-
fi
35-
echo ${RES}
3613
unit-tests:
37-
needs: checks
3814
runs-on: ubuntu-latest
3915
strategy:
4016
matrix:

0 commit comments

Comments
 (0)