-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.32 KB
/
Copy pathpython-static.yml
File metadata and controls
54 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Python static checks
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: python-static-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-checks:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: CryptGuardv2/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r CryptGuardv2/requirements.txt
- name: Compile Python sources
env:
PYTHONPYCACHEPREFIX: ${{ runner.temp }}/cryptguard-pycache
run: python -m compileall -q CryptGuardv2
# Ruff starts as advisory while the application code is professionalized.
- name: Ruff advisory check
continue-on-error: true
shell: bash
run: |
if python -m ruff --version >/dev/null 2>&1; then
python -m ruff check CryptGuardv2
else
echo "Ruff is not available; skipping advisory check."
fi