Skip to content

Commit

Permalink
infra: Dedicated code format check workflow (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
speller26 committed May 27, 2023
1 parent 928f5aa commit 392df75
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Check code format

on:
pull_request:
branches:
- main
- feature/**

jobs:
check-code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
- name: Run code format checks
run: |
black --check .
flake8
6 changes: 0 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -28,11 +27,6 @@ jobs:
run: |
pip install --upgrade pip
pip install -e .[test]
- name: Check code format
run: |
# stop the build if there are Python format errors or undefined names
black --check .
flake8
- name: Run unit tests
run: |
tox -e unit-tests
Expand Down

0 comments on commit 392df75

Please sign in to comment.