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
3 changes: 1 addition & 2 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ on:
jobs:
test-lint-scan:
uses: ./.github/workflows/test_lint_scan.yml
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

build_release:
name: Build Release
needs: test-lint-scan
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ on:

jobs:
test-lint-scan:
uses: ./.github/workflows/test_lint_scan.yml
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
uses: ./.github/workflows/test_lint_scan.yml
32 changes: 14 additions & 18 deletions .github/workflows/test_lint_scan.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Test - Lint - Scan
on:
workflow_call:
secrets:
SNYK_TOKEN:
required: true
workflow_call: {}
workflow_dispatch: {}

jobs:
test:
name: Testing
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, 3.10, 3.11]
python-version: [3.8, 3.9, "3.10", 3.11]

runs-on: ${{ matrix.os }}

Expand All @@ -23,7 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm install -dG :all --no-self
pdm install -dG :all
- name: Run Testing
run: |
pdm run -v testing
Expand Down Expand Up @@ -51,28 +49,26 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Initialize Runtime Code Analysis
uses: github/codeql-action/init@v2
with:
languages: python
- name: Setup snyk CLI
uses: snyk/actions/setup@master
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
pdm install -dG :all --no-self
# Set the `CODEQL-PYTHON` environment variable to the Python executable
# that includes the dependencies
echo "CODEQL_PYTHON=$(pdm info --python)" >> $GITHUB_ENV
- name: Initialize Runtime Code Analysis
uses: github/codeql-action/init@v2
with:
languages: python
setup-python-dependencies: false
- name: Perform Runtime Code Analysis
uses: github/codeql-action/analyze@v2
- name: Perform Secure Code Analysis (Secrets)
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.ref_name }}
head: HEAD
- name: Snyk monitor
run: snyk test
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
base: ${{ github.event.repository.default_branch }}
head: HEAD