Skip to content

Commit 4696457

Browse files
committed
chore: update workflows to fix multiple workflow failures
Working on test suite to fix testing issues.
1 parent 346f027 commit 4696457

25 files changed

+211
-240
lines changed

.coveragerc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ branch = True
33
source = src
44

55
[report]
6-
show_missing = true
7-
skip_covered = true
6+
show_missing = True
7+
skip_covered = True
8+
fail_under = 80
89
exclude_lines =
910
pragma: no cover
10-
if __name__ == .__main__.:
11+
if __name__ == '__main__':
1112

1213
[html]
1314
directory = htmlcov
14-
show_contexts = true
15+
show_contexts = True
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: 🏷️ Label Dependabot PRs for Auto-Rebase
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
jobs:
7+
label-dependabot:
8+
if: github.actor == 'dependabot[bot]'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Add autorebase label
12+
uses: actions/github-script@v7
13+
with:
14+
script: |-
15+
github.rest.issues.addLabels({
16+
issue_number: context.issue.number,
17+
owner: context.repo.owner,
18+
repo: context.repo.repo,
19+
labels: ['autorebase']
20+
})
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
22
name: 🔁 Auto Rebase Pull Requests
33
on:
4-
schedule:
5-
- cron: 0 5 * * *
4+
pull_request_target:
5+
types: [labeled, synchronize]
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
rebase:
11+
if: contains(github.event.pull_request.labels.*.name, 'autorebase')
812
runs-on: ubuntu-latest
913
steps:
10-
- uses: actions/checkout@v4
11-
- uses: cirrus-actions/[email protected]
14+
- name: Auto Rebase PR
15+
uses: cirrus-actions/[email protected]
1216
env:
1317
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Build and Push Docker Image.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ jobs:
4343
--tag ghcr.io/${{ github.repository }}:${{ github.sha }} \
4444
--tag ghcr.io/${{ github.repository }}:${{ env.VERSION }} \
4545
.
46+
- name: 📥 Install Syft CLI
47+
run: |
48+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
4649
- name: 📜 Generate SBOM for Docker Image
4750
run: |
48-
pip install syft==0.98.0
4951
syft ghcr.io/${{ github.repository }}:${{ env.VERSION }} -o cyclonedx-json > sbom.image.json
5052
- name: 🧾 Get Image Digest
5153
run: |
52-
IMAGE_DIGEST=$(syft ghcr.io/${{ github.repository }}:${{ env.VERSION }} -o json | jq -r '.artifacts[0].digest')
54+
IMAGE_DIGEST=$(syft ghcr.io/${{ github.repository }}:${{ env.VERSION }} -o json | jq -r '.descriptor.digest')
5355
echo "IMAGE_DIGEST=$IMAGE_DIGEST" >> $GITHUB_ENV
5456
- name: 📤 Upload SBOM
5557
uses: actions/upload-artifact@v4

.github/workflows/Code Coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
python-version: '3.11'
1515
- run: pip install -e .[dev]
1616
- run: pytest --cov=src --cov-report=xml
17-
- uses: codecov/codecov-action@v4
17+
- uses: codecov/codecov-action@v5

.github/workflows/GitHub Workflow Lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
with:
1010
fetch-depth: 0 # ✅ Fix for Super Linter SHA access
1111
- name: Super Linter
12-
uses: github/super-linter@v6
12+
uses: github/super-linter@v7
1313
env:
1414
VALIDATE_ALL_CODEBASE: false
1515
VALIDATE_YAML: true

.github/workflows/Python Matrix Test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ on: [push, pull_request]
44
jobs:
55
test:
66
runs-on: ubuntu-latest
7+
timeout-minutes: 20 # ⏲️ Fail fast if something hangs too long
78
strategy:
9+
max-parallel: 2 # 🚦 Prevent all matrix jobs running simultaneously
810
matrix:
911
python-version: ['3.9', '3.10', '3.11', '3.12']
1012
steps:
1113
- uses: actions/checkout@v4
1214
- uses: actions/setup-python@v5
1315
with:
1416
python-version: ${{ matrix.python-version }}
15-
- run: pip install -e .[dev]
16-
- run: pytest
17+
- name: Install dependencies
18+
run: pip install -e .[dev]
19+
- name: Run tests
20+
run: pytest --maxfail=3 --disable-warnings --durations=10

.github/workflows/ci-experiments/ci-failure-notifications-split.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: Notify Slack
1818
if: env.SLACK_WEBHOOK_URL != ''
19-
uses: slackapi/slack-github-action@v1.24.0
19+
uses: slackapi/slack-github-action@v2.1.1
2020
with:
2121
payload: |
2222
{

.gitignore

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ cover/
6060
local_settings.py
6161
db.sqlite3
6262
db.sqlite3-journal
63+
*.sqlite*
64+
*.db
6365

6466
# Flask stuff:
6567
instance/
6668
.webassets-cache
6769

70+
#Ignore SBOM artifacts
71+
sbom*.json
72+
bom.json
73+
6874
# Scrapy stuff:
6975
.scrapy
7076

@@ -82,6 +88,9 @@ target/
8288
profile_default/
8389
ipython_config.py
8490

91+
#log files
92+
sync.log
93+
8594
# pyenv
8695
# For a library or package, you might want to ignore these files since the code is
8796
# intended to run in multiple environments; otherwise, check them in:
@@ -92,18 +101,18 @@ ipython_config.py
92101
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93102
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94103
# install all needed dependencies.
95-
#Pipfile.lock
104+
Pipfile.lock
96105

97106
# poetry
98107
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99108
# This is especially recommended for binary packages to ensure reproducibility, and is more
100109
# commonly ignored for libraries.
101110
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102-
#poetry.lock
111+
poetry.lock
103112

104113
# pdm
105114
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106-
#pdm.lock
115+
pdm.lock
107116
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108117
# in version control.
109118
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
64-
All complaints will be reviewed and investigated promptly and fairly.
63+
[[email protected]](mailto:[email protected]). All complaints will
64+
be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the
6767
reporter of any incident.
@@ -118,8 +118,8 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118118
version 2.1, available at
119119
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120120

121-
Community Impact Guidelines were inspired by
122-
[Mozilla's code of conduct enforcement ladder][mozilla coc].
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder][mozilla coc].
123123

124124
For answers to common questions about this code of conduct, see the FAQ at
125125
[https://www.contributor-covenant.org/faq][faq]. Translations are available at

0 commit comments

Comments
 (0)