Skip to content

Commit 031c70d

Browse files
feat: add DPoP support (#16)
* feat: add DPoP support * chore: update GitHub Actions to use checkout@v5 and remove semgrep and docs workflows
1 parent d6afc9a commit 031c70d

File tree

20 files changed

+2630
-924
lines changed

20 files changed

+2630
-924
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
3737

3838
- name: Checkout
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v5
4040

4141
- name: Initialize CodeQL
4242
uses: github/codeql-action/init@v3

.github/workflows/docs.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: Checkout code
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v5
3636
with:
3737
fetch-depth: 0
3838
fetch-tags: true

.github/workflows/rl-scanner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
scan-status: ${{ steps.rl-scan-conclusion.outcome }}
3232

3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v5
3535
with:
3636
fetch-depth: 0
3737
fetch-tags: true

.github/workflows/semgrep.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/snyk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
3232
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
3333

34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v5
3535
with:
3636
ref: ${{ github.event.pull_request.head.sha || github.ref }}
3737

.github/workflows/test.yml

Lines changed: 44 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,68 +18,53 @@ concurrency:
1818
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1919

2020
jobs:
21-
run:
22-
name: Run
21+
test:
2322
runs-on: ubuntu-latest
24-
25-
env:
26-
BUBBLEWRAP_ARGUMENTS: |
27-
--unshare-all \
28-
--clearenv \
29-
--ro-bind / / \
30-
--bind ${{ github.workspace }} ${{ github.workspace }} \
31-
--tmpfs $HOME \
32-
--tmpfs /tmp \
33-
--tmpfs /var \
34-
--dev /dev \
35-
--proc /proc \
36-
--die-with-parent \
37-
--new-session \
38-
3923
strategy:
4024
matrix:
41-
python-version: ["3.9", "3.10", "3.11", "3.12"]
42-
25+
python-version: [3.9, "3.10", "3.11", "3.12"]
26+
4327
steps:
44-
- name: Checkout code
45-
uses: actions/checkout@v4
46-
with:
47-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
48-
49-
- name: Configure Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v5
51-
with:
52-
python-version: "${{ matrix.python-version }}"
53-
54-
- name: Configure dependencies
55-
run: |
56-
sudo apt install bubblewrap
57-
pip install --user --upgrade pip
58-
pip install --user pipx
59-
pip install --user setuptools
60-
pipx ensurepath
61-
pipx install poetry
62-
poetry config virtualenvs.in-project true
63-
poetry install --with dev
64-
poetry self add "poetry-dynamic-versioning[plugin]"
65-
66-
- name: Run tests
67-
run: |
68-
poetry run pytest
28+
- name: Checkout code
29+
uses: actions/checkout@v5
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install Poetry
37+
uses: snok/install-poetry@v1
38+
with:
39+
version: latest
40+
virtualenvs-create: true
41+
virtualenvs-in-project: true
42+
installer-parallel: true
43+
44+
- name: Load cached venv
45+
id: cached-poetry-dependencies
46+
uses: actions/cache@v3
47+
with:
48+
path: ./.venv
49+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
50+
51+
- name: Install dependencies
52+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
53+
run: poetry install --no-interaction --no-root
54+
55+
- name: Install package
56+
run: poetry install --no-interaction
57+
58+
- name: Run tests with pytest
59+
run: |
60+
poetry run pytest -v --cov=src --cov-report=term-missing --cov-report=xml
6961
70-
# - name: Run lint
71-
# run: |
72-
# pipx install black==23.3.0
73-
# pipx install flake8==5.0.4
74-
# pipx install isort==5.11.5
75-
# pipx install pyupgrade==3.3.2
76-
# black . --check
77-
# flake8 . --count --show-source --statistics
78-
# isort . --diff --profile black
79-
# pyupgrade . --py37-plus --keep-runtime-typing
62+
- name: Run ruff linting
63+
run: |
64+
poetry run ruff check .
8065
81-
- if: ${{ matrix.python-version == '3.10' }}
82-
name: Upload coverage
83-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # pin@5.4.3
84-
with:
85-
token: ${{ secrets.CODECOV_TOKEN }}
66+
# - if: ${{ matrix.python-version == '3.10' }}
67+
# name: Upload coverage
68+
# uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # pin@5.5.0
69+
# with:
70+
# token: ${{ secrets.CODECOV_TOKEN }}

.ruff.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
line-length = 100
2+
target-version = "py39"
3+
select = [
4+
"E", # pycodestyle errors
5+
"W", # pycodestyle warnings
6+
"F", # pyflakes
7+
"I", # isort
8+
"B", # flake8-bugbear
9+
"C4", # flake8-comprehensions
10+
"UP", # pyupgrade
11+
"S", # bandit (security)
12+
]
13+
ignore = ["E501", "B904"] # Line too long (handled by black), Exception handling without from
14+
15+
[per-file-ignores]
16+
"tests/*" = ["S101", "S105", "S106"] # Allow assert and ignore hardcoded password warnings in test files

0 commit comments

Comments
 (0)