Skip to content

Commit

Permalink
Add GitHub workflows and remove docs env
Browse files Browse the repository at this point in the history
  • Loading branch information
jg-rp committed Mar 14, 2024
1 parent e342546 commit a390e2d
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 14 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: lint
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade hatch
- run: hatch run lint
31 changes: 31 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: tests
on: [push, pull_request]

jobs:
tests:
name: ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.7"
- os: windows-latest
python-version: "3.7"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade hatch
- name: Test
run: hatch run test
17 changes: 17 additions & 0 deletions .github/workflows/typing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: typing
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade hatch
- run: hatch run typing
7 changes: 0 additions & 7 deletions jsonpath_rfc9535/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,6 @@ class Parser:
]
)

RE_FLAG_MAP = {
"a": re.A,
"i": re.I,
"m": re.M,
"s": re.S,
}

_INVALID_NAME_SELECTOR_CHARS = f"[{''.join(INVALID_NAME_SELECTOR_CHARS)}]"
RE_INVALID_NAME_SELECTOR = re.compile(
rf'(?:(?!(?<!\\)"){_INVALID_NAME_SELECTOR_CHARS})'
Expand Down
7 changes: 0 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ typing = "mypy"
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.docs]
dependencies = ["black", "mkdocs", "mkdocstrings[python]", "mkdocs-material"]

[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --dev-addr localhost:8000"

[tool.coverage.run]
branch = true
parallel = true
Expand Down

0 comments on commit a390e2d

Please sign in to comment.