Skip to content

Commit

Permalink
wip modernizing the CI config and linting tools
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuDartiailh committed Jan 1, 2025
1 parent 51a44f6 commit b5728aa
Show file tree
Hide file tree
Showing 25 changed files with 1,940 additions and 1,554 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,52 @@ on:
- setup.py

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['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 }}
cache: 'pip'
cache-dependency-path: 'lint_requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install project
run: |
pip install -e .
- name: Install dependencies
run: |
pip install -U -r lint_requirements.txt
- name: Formatting
if: always()
run: |
ruff format pyclibrary tests --check
- name: Linting
if: always()
run: |
ruff check pyclibrary tests
- name: Typing
if: always()
run: |
mypy pyclibrary
tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -39,7 +74,7 @@ jobs:
pip install pytest-cov
python -m pytest tests --cov pyclibrary --cov-report xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
name: Docs building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Build sdist
run: |
pip install --upgrade pip
Expand Down
Loading

0 comments on commit b5728aa

Please sign in to comment.