Skip to content

Commit 2cd404e

Browse files
authored
Update github workflows
2 parents 1342a13 + bf67b98 commit 2cd404e

3 files changed

Lines changed: 16 additions & 23 deletions

File tree

.github/workflows/build_release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ on:
99
jobs:
1010
test-lint-scan:
1111
uses: ./.github/workflows/test_lint_scan.yml
12-
secrets:
13-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1412

1513
build_release:
1614
name: Build Release
15+
needs: test-lint-scan
1716
permissions:
1817
# IMPORTANT: this permission is mandatory for trusted publishing
1918
id-token: write

.github/workflows/pull_requests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ on:
1111

1212
jobs:
1313
test-lint-scan:
14-
uses: ./.github/workflows/test_lint_scan.yml
15-
secrets:
16-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14+
uses: ./.github/workflows/test_lint_scan.yml

.github/workflows/test_lint_scan.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Test - Lint - Scan
22
on:
3-
workflow_call:
4-
secrets:
5-
SNYK_TOKEN:
6-
required: true
3+
workflow_call: {}
4+
workflow_dispatch: {}
75

86
jobs:
97
test:
108
name: Testing
119
strategy:
1210
matrix:
1311
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: [3.8, 3.9, 3.10, 3.11]
12+
python-version: [3.8, 3.9, "3.10", 3.11]
1513

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

@@ -23,7 +21,7 @@ jobs:
2321
python-version: ${{ matrix.python-version }}
2422
- name: Install dependencies
2523
run: |
26-
pdm install -dG :all --no-self
24+
pdm install -dG :all
2725
- name: Run Testing
2826
run: |
2927
pdm run -v testing
@@ -51,28 +49,26 @@ jobs:
5149

5250
steps:
5351
- uses: actions/checkout@v3
54-
- name: Initialize Runtime Code Analysis
55-
uses: github/codeql-action/init@v2
56-
with:
57-
languages: python
58-
- name: Setup snyk CLI
59-
uses: snyk/actions/setup@master
6052
- name: Set up PDM
6153
uses: pdm-project/setup-pdm@v3
6254
with:
6355
python-version: 3.11
6456
- name: Install dependencies
6557
run: |
6658
pdm install -dG :all --no-self
59+
# Set the `CODEQL-PYTHON` environment variable to the Python executable
60+
# that includes the dependencies
61+
echo "CODEQL_PYTHON=$(pdm info --python)" >> $GITHUB_ENV
62+
- name: Initialize Runtime Code Analysis
63+
uses: github/codeql-action/init@v2
64+
with:
65+
languages: python
66+
setup-python-dependencies: false
6767
- name: Perform Runtime Code Analysis
6868
uses: github/codeql-action/analyze@v2
6969
- name: Perform Secure Code Analysis (Secrets)
7070
uses: trufflesecurity/trufflehog@main
7171
with:
7272
path: ./
73-
base: ${{ github.ref_name }}
74-
head: HEAD
75-
- name: Snyk monitor
76-
run: snyk test
77-
env:
78-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
73+
base: ${{ github.event.repository.default_branch }}
74+
head: HEAD

0 commit comments

Comments
 (0)