Skip to content

Commit

Permalink
Improve GitHub workflows
Browse files Browse the repository at this point in the history
- modify triggering events: only push to main branch and pull_requests trigger lint
- add pylint to the linting workflow
  • Loading branch information
LinaHeinzke committed Feb 22, 2024
1 parent bc9d7b4 commit d8bef60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Docs

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

jobs:
build_docs:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Lint

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

jobs:
build:
lint:
name: Lint (black + pylint)
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -17,7 +22,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Analysing the code with black
pip install black pylint
- name: Analyse the code with black
run: |
black src --check
- name: Analyse the code with pylint
# ignore grid tables when checking for long lines
run: |
pylint src --ignored-modules rdkit --ignore-long-lines "^\s*(\+[\-\=]+)+\+|(?:\|.*)+\|"

0 comments on commit d8bef60

Please sign in to comment.