Skip to content

Commit

Permalink
CI: Add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Feb 19, 2024
1 parent a9e5e82 commit 542952e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: |
docker pull openturns/archlinux-module
Expand All @@ -27,7 +27,7 @@ jobs:
mingw:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: |
docker pull openturns/archlinux-module-mingw
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint source code

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: |
sudo apt-get install python3-pip
pip3 install flake8
- name: Run linter
run: ./utils/lint.sh

5 changes: 5 additions & 0 deletions utils/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# pip install flake8

PATH=~/.local/bin/:$PATH flake8 python/ --ignore=W503 --max-line-length=120
File renamed without changes.

0 comments on commit 542952e

Please sign in to comment.