-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style/ci(linter/formatter): use ruff & black only
Only use ruff and black to lint and format code. Only run linter and formatter in CI. Do not bother with test setup.
- Loading branch information
1 parent
e00a309
commit b10be00
Showing
5 changed files
with
60 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,9 @@ | ||
name: Python Tools and Tests | ||
|
||
on: [ push ] | ||
|
||
name: Python Linting | ||
on: [ push, pull_request ] | ||
jobs: | ||
build-analyze-test: | ||
runs-on: ubuntu-22.04 | ||
name: "Build, Analyze and Test" | ||
defaults: | ||
run: | ||
shell: bash | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: awalsh128/cache-apt-pkgs-action@v1 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Install system dependencies | ||
run: sudo apt-get install -y --no-upgrade libzbar0 libgdal-dev libgl1 | ||
- name: Install numpy | ||
run: poetry run pip install numpy==1.23.5 | ||
- name: Install pygdal | ||
run: poetry run pip install pygdal==3.4.1.10 | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run flake8 | ||
run: poetry run flake8 sketch_map_tool | ||
continue-on-error: true | ||
- name: Run bandit | ||
run: poetry run bandit --recursive sketch_map_tool | ||
continue-on-error: true | ||
- name: Run black | ||
run: poetry run black --check --diff sketch_map_tool | ||
continue-on-error: true | ||
- name: Run isort | ||
run: poetry run isort --check --diff sketch_map_tool | ||
continue-on-error: true | ||
- name: Running tests | ||
run: poetry run pytest tests/unit | ||
- uses: chartboost/ruff-action@v1 | ||
- uses: psf/black@stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.