-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (50 loc) · 1.3 KB
/
code-check.yml
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
55
56
57
58
59
60
61
62
63
name: Code quality checks
on:
push:
branches:
- '*'
tags:
- '*'
paths-ignore:
- '**.md'
pull_request:
branches:
- '*'
paths-ignore:
- '**.md'
jobs:
code-check:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache venv
id: code-check-cache
uses: actions/cache@v4
with:
path: .venv
key: code-check-python-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.code-check-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Check code style
run: poetry run poe check:style
- name: Check lint
run: poetry run poe check:lint
- name: Check security issues
run: poetry run poe check:security
- name: Check for dead code
run: poetry run poe check:deadcode
- name: Check shell scripts
run: |
sudo apt-get install -y shellcheck
shellcheck tests/test.sh