-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add test coverage reporting with GitHub Pages badge #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6e287e6
21894cf
a5aa667
1f58e9f
c71a478
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,6 +12,8 @@ concurrency: | |||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| pages: write | ||||||
| id-token: write | ||||||
|
Comment on lines
13
to
+16
|
||||||
|
|
||||||
| jobs: | ||||||
| typos: | ||||||
|
|
@@ -59,3 +61,46 @@ jobs: | |||||
|
|
||||||
| - name: Run Tests | ||||||
| run: nix develop --command just test | ||||||
|
|
||||||
| coverage: | ||||||
| runs-on: ubuntu-latest | ||||||
| if: github.ref == 'refs/heads/main' | ||||||
| env: | ||||||
| STACKONE_API_KEY: ${{ secrets.STACKONE_API_KEY }} | ||||||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||||||
|
|
||||||
| - name: Setup Nix | ||||||
| uses: ./.github/actions/setup-nix | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| run: nix develop --command just install --all-extras | ||||||
|
||||||
| run: nix develop --command just install --all-extras | |
| run: nix develop --command just install |
Copilot
AI
Dec 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deploy-coverage job could have concurrency issues. If multiple pushes to main happen in quick succession, the workflow cancellation strategy (cancel-in-progress: true) combined with the job dependency could result in incomplete deployments or race conditions. Consider adding a concurrency group specifically for the deployment jobs to ensure only one deployment runs at a time.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ | |
| .pytest_cache | ||
| .python-version | ||
| __pycache__ | ||
| .coverage | ||
| coverage/ | ||
|
|
||
| .DS_Store | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -123,3 +123,26 @@ ignore_missing_imports = true | |||||
| module = "mcp.*" | ||||||
| ignore_missing_imports = true | ||||||
| ignore_errors = true | ||||||
|
|
||||||
| [tool.coverage.run] | ||||||
| source = ["stackone_ai"] | ||||||
| branch = true | ||||||
| omit = [ | ||||||
| "stackone_ai/__init__.py", | ||||||
| "**/py.typed", | ||||||
|
||||||
| "**/py.typed", | |
| "stackone_ai/py.typed", |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Permissions
pages: writeandid-token: writeare set at workflow level, granting elevated permissions to all jobs includingtyposandciwhich don't need them. Consider moving these permissions to job-level for only thecoverageanddeploy-coveragejobs to follow the principle of least privilege.Prompt for AI agents