Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ jobs:
static-check:
name: Run Static Analysis
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v7
with:
# Betterleaks scans git history across refs, so it needs the full
# history rather than the default shallow clone.
fetch-depth: 0

- name: Run Betterleaks
Expand All @@ -25,24 +24,27 @@ jobs:
uses: dortort/betterleaks-action@cd0b905aa4befb8f42f8b1ab98150180c9e77515
with:
version: "v1.9.0"
report-path: betterleaks-report.sarif
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Betterleaks report
if: always()
uses: actions/upload-artifact@v7
if: always()
with:
name: betterleaks-report
path: betterleaks-report.sarif
if-no-files-found: warn
path: ${{ steps.betterleaks.outputs.report-path }}

- name: Fail if Betterleaks found leaks
if: steps.betterleaks.outcome == 'failure'
run: exit 1
run: |
echo "Betterleaks reported a failure in at least one scan."
exit 1

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
python-version: "3.12"

- name: Cache dependencies
uses: actions/cache@v6
Expand Down Expand Up @@ -71,6 +73,6 @@ jobs:

- name: Run all static analysis
env:
SKIP: sphinx-html,sphinx-linkcheck
SKIP: betterleaks,sphinx-html,sphinx-linkcheck
run: |
prek run --all-files
20 changes: 0 additions & 20 deletions .github/workflows/_workflow_lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
workflow-lint:
uses: ./.github/workflows/_workflow_lint.yml
uses: mindee/client-lib-actions/.github/workflows/workflow-lint.yml@main
static-analysis:
uses: ./.github/workflows/_static-analysis.yml
needs: workflow-lint
Expand Down
Loading