Skip to content

Commit

Permalink
ci: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Feb 8, 2024
1 parent be3183f commit f5e61ce
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ on:
push:
name: release-please
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Autoformat with black
run: |
black .
- name: Lint with ruff
run: |
ruff check .
ruff fix .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: style fixes by ruff and autoformatting by black"

continuous-integration:
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand All @@ -18,17 +38,7 @@ jobs:
- name: Installing dependencies
shell: bash -l {0}
run: |
conda install -c conda-forge cython numpy scipy scikit-image scikit-learn pyamg ruff black pytest networkx osqp matplotlib -y
- name: Checking formatting of code
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check LoopStructural
ruff fix LoopStructural
black LoopStructural
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: style fixes by ruff and autoformatting by black"
conda install -c conda-forge cython numpy scipy scikit-image scikit-learn pyamg pytest networkx osqp matplotlib -y
- name: Building and install
shell: bash -l {0}
run: |
Expand Down

0 comments on commit f5e61ce

Please sign in to comment.