From 10431ef8a3cc7a979c070b2dbd8219462fe77e3a Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 4 Aug 2020 15:22:44 -0700 Subject: [PATCH] ci lint with pre-commit --- .github/workflows/main.yaml | 50 +++---------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 017e189..e28056c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,54 +7,12 @@ on: branches: master jobs: - lint-black: - name: black-formatter + lint: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2.3.1 - - name: Set up Python 3.8 - uses: actions/setup-python@v2.1.1 - with: - python-version: 3.8 - - name: Install Black - run: | - python -m pip install black - - name: Black Code Formatter - run: | - black --check --line-length 100 --skip-string-normalization . - lint-flake8: - name: flake8 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.1 - - name: Set up Python 3.8 - uses: actions/setup-python@v2.1.1 - with: - python-version: 3.8 - - name: Install Flake8 - run: | - python -m pip install flake8 - - name: Flake8 check - run: | - flake8 . - lint-isort: - name: isort - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.1 - - name: Set up Python 3.8 - uses: actions/setup-python@v2.1.1 - with: - python-version: 3.8 - - name: Install isort - run: | - python -m pip install isort - - name: isort check - run: | - isort --check-only . + - uses: actions/checkout@v2.3.1 + - uses: actions/setup-python@v2.1.1 + - uses: pre-commit/action@v2.0.0 test: name: ${{ matrix.python-version }}-build runs-on: ubuntu-latest