Skip to content

Commit

Permalink
Use ruff for formatting and update deps and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jun 27, 2024
1 parent 07cd5f7 commit de5cbf9
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 470 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'

- name: Lint with ruff
run: |
pip install ruff
ruff check .
ruff format --check .
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ jobs:
name: Build wheels
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.12']

permissions:
contents: write
id-token: write
Expand All @@ -23,14 +19,15 @@ jobs:
uses: actions/checkout@v4

- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: sdsstools ${{ github.ref_name }}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
python-version: 3.12

- name: Install dependencies
run: |
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,11 @@ jobs:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
pip install --upgrade wheel pip setuptools
pip install .
- name: Lint with ruff
run: |
pip install ruff
ruff check .
- name: Lint with black
run: |
pip install black
black --check src/
black --check test/
- name: Test with pytest
run: |
pip install pytest pytest-cov pytest-mock pytest-asyncio
Expand Down
Loading

0 comments on commit de5cbf9

Please sign in to comment.