Skip to content

Commit

Permalink
Merge pull request #265 from dalthviz/add_pre_commit
Browse files Browse the repository at this point in the history
PR: Add initial `pre-commit` config file and fix CI (macOS image label and codecov token errors)
  • Loading branch information
ccordoba12 authored Nov 26, 2024
2 parents 68abecc + df030d2 commit 6e797d4
Show file tree
Hide file tree
Showing 18 changed files with 675 additions and 602 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ec7f2c8ecdcb9a7f4b7e451536f4aab3fa251916
6 changes: 4 additions & 2 deletions .github/workflows/linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: false
Expand All @@ -57,7 +57,9 @@ jobs:
xvfb-run --auto-servernum python example.py
xvfb-run --auto-servernum pytest -x -vv --cov-report xml --cov=qtawesome qtawesome
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9 changes: 6 additions & 3 deletions .github/workflows/macos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
macos:
name: Mac Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }}
timeout-minutes: 15
runs-on: macos-latest
runs-on: macos-13
env:
CI: True
QT_API: ${{ matrix.QT_BINDING }}
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v1
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: false
Expand All @@ -52,7 +52,10 @@ jobs:
python example.py
pytest -x -vv --cov-report xml --cov=qtawesome qtawesome
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

7 changes: 5 additions & 2 deletions .github/workflows/windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v1
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: false
Expand Down Expand Up @@ -55,7 +55,10 @@ jobs:
pytest -x -vv --cov-report xml --cov=qtawesome qtawesome
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.4
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
Loading

0 comments on commit 6e797d4

Please sign in to comment.