Skip to content

Commit

Permalink
test python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
arkinmodi committed Oct 9, 2023
1 parent e1c388d commit 8d3a94f
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 52 deletions.
13 changes: 9 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 1
interval: monthly
groups:
github-actions:
patterns:
- "*"
39 changes: 0 additions & 39 deletions .github/workflows/lint.yml

This file was deleted.

19 changes: 10 additions & 9 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# yamllint disable rule:line-length
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# yamllint enable rule:line-length
---
name: Test Application
on:
"on":
pull_request:
push:
branches:
Expand All @@ -9,25 +13,22 @@ on:

jobs:
tox:
name: 🧪 ${{ matrix.env }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
env: ['py38', 'py39', 'py310', 'py311']
env: ['py38', 'py39', 'py310', 'py311', 'py312']
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4

- name: 🐍 Setup Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: |
${{
matrix.env == 'py38' && '3.8' ||
matrix.env == 'py39' && '3.9' ||
matrix.env == 'py310' && '3.10' ||
'3.11'
matrix.env == 'py311' && '3.11' ||
'3.12'
}}
- run: python -m pip install --upgrade setuptools tox virtualenv
Expand Down
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# yamllint disable rule:line-length
# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json
# yamllint enable rule:line-length
---
ci:
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: debug-statements
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: name-tests-test
- id: trailing-whitespace
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: [--py38-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
2 changes: 2 additions & 0 deletions tests/generate_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import random
import string
Expand Down
2 changes: 2 additions & 0 deletions tests/run_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import sys
from unittest.mock import MagicMock
from unittest.mock import patch
Expand Down
2 changes: 2 additions & 0 deletions tests/utils_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from unittest.mock import MagicMock
from unittest.mock import patch

Expand Down

0 comments on commit 8d3a94f

Please sign in to comment.