-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (48 loc) · 1.86 KB
/
Copy pathcheck_hightime.yml
File metadata and controls
51 lines (48 loc) · 1.86 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
name: Check hightime
on:
workflow_call:
workflow_dispatch:
permissions: {}
jobs:
check_hightime:
name: Check hightime
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2554c7e5680982d3355677b2290e48b60678744 # v0.8.0
id: setup-python
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@a2554c7e5680982d3355677b2290e48b60678744 # v0.8.0
- name: Check for lock changes
run: poetry check --lock
- name: Cache virtualenv
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .venv
key: hightime-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install hightime
run: poetry install -v
- name: Lint
run: poetry run ni-python-styleguide lint
- name: Mypy static analysis (Linux)
run: poetry run mypy
- name: Mypy static analysis (Windows)
run: poetry run mypy --platform win32
- name: Bandit security checks
run: poetry run bandit -c pyproject.toml -r hightime
# - name: Add virtualenv to the path for pyright-action
# run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
# - name: Pyright static analysis (Linux)
# uses: jakebailey/pyright-action@b5d50e5cde6547546a5c4ac92e416a8c2c1a1dfe # v2.3.2
# with:
# python-platform: Linux
# version: PATH
# - name: Pyright static analysis (Windows)
# uses: jakebailey/pyright-action@b5d50e5cde6547546a5c4ac92e416a8c2c1a1dfe # v2.3.2
# with:
# python-platform: Windows
# version: PATH