Skip to content

Commit

Permalink
Add black check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG committed Sep 25, 2023
1 parent cd39c95 commit a0d7b14
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Test Python package

on:
push:
Expand All @@ -10,8 +10,16 @@ on:
branches: [ "main" ]

jobs:
build:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: "proteobench"
version: "~=23"

lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -29,7 +37,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .
python -m pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test-streamlit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Streamlit UI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: "proteobench"
version: "~=23"

linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9 # Streamlit.io default (as of 2023/09/25)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 streamlit --count ----show-source --statistics

0 comments on commit a0d7b14

Please sign in to comment.