Skip to content

Commit

Permalink
ci(*): Separate linter and unit tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet committed Feb 9, 2024
1 parent 9e8ab4f commit dd7bd3f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python linter

on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
linter:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install setuptools
if: contains(fromJson('["3.12"]'),matrix.python-version)
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py install
python -m pip install -r requirements-dev.txt
- name: Lint check
run: |
black --check -v ./
6 changes: 1 addition & 5 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
workflow_dispatch:

jobs:
build:
unittests:

runs-on: ubuntu-latest
strategy:
Expand All @@ -38,10 +38,6 @@ jobs:
python setup.py install
python -m pip install -r requirements-dev.txt
- name: Lint check
run: |
black --check -v ./
- name: Tests
run: |
python -m pytest

0 comments on commit dd7bd3f

Please sign in to comment.