Skip to content

Commit

Permalink
Merge pull request #85 from snok/workflows
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
sondrelg authored Aug 26, 2022
2 parents 6b535cb + b95ecec commit 6b4f951
Show file tree
Hide file tree
Showing 5 changed files with 252 additions and 272 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install --upgrade pip poetry
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install pre-commit
if: steps.cache-venv.outputs.cache-hit != 'true'
- uses: actions/cache@v2
- uses: actions/cache@v3
id: pre-commit-cache
with:
path: ~/.cache/pre-commit
Expand All @@ -30,18 +29,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha.5" ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11.0-rc.1" ]
django-version: [ "3.1.4", "3.2", "4.0" ]
exclude:
# Django v4 drops Python 3.7 support
- django-version: 4.0
python-version: 3.7
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: poetry-cache
with:
path: ~/.local
Expand All @@ -50,7 +49,7 @@ jobs:
with:
virtualenvs-create: false
version: 1.1.13
- uses: actions/cache@v2
- uses: actions/cache@v3
id: cache-venv
with:
path: .venv
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black
args: ['--quiet']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.3.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
Expand All @@ -31,7 +31,7 @@ repos:
]
args: ['--enable-extensions=G']
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v2.37.3
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand All @@ -43,6 +43,6 @@ repos:
- id: isort
files: 'tests/.*'
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v0.971
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion django_guid/log_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ def filter(self, record: 'LogRecord') -> bool:
:param record: Log record
:return: True
"""
record.correlation_id = guid.get() # type: ignore[attr-defined]
record.correlation_id = guid.get()
return True
Loading

0 comments on commit 6b4f951

Please sign in to comment.