Skip to content

Commit

Permalink
use ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Sep 2, 2024
1 parent 363a7b4 commit 86d0af4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: Tests
on: [push, pull_request]

jobs:
Test:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
test:
runs-on: ubuntu-latest
needs: ruff
strategy:
matrix:
python-version:
Expand All @@ -13,18 +19,19 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- 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: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
echo version=$(python -c "import sys, platform; print('.'.join(str(v) for v in sys.version_info[:3]) + '_' + platform.machine())") >> $GITHUB_OUTPUT
- name: Set up cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -34,13 +41,9 @@ jobs:
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install
- name: Lint
run: |
poetry run pylama wapi2nsconf
- name: Check formatting
- name: Ruff
run: |
poetry run isort --check wapi2nsconf
poetry run black --check wapi2nsconf
poetry run ruff check wapi2nsconf
- name: Check example configuration file
run: |
poetry run wapi2nsconf --check --conf wapi2nsconf-example.yaml
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PEP 518: https://www.python.org/dev/peps/pep-0518/
[tool.poetry]
name = "wapi2nsconf"
version = "0.4.1"
version = "0.4.2"
description = "Infoblox WAPI to DNS server configuration tool"
authors = ["Jakob Schlyter <[email protected]>"]
license = "BSD"
Expand Down

0 comments on commit 86d0af4

Please sign in to comment.