-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (43 loc) · 1.62 KB
/
style.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
name: Lint
on: [push, pull_request]
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: pip install black flake8
- name: Run linters
uses: wearerequired/lint-action@v2
with:
black: true
# black_args: "--line-length=120"
flake8: true
# flake8_args: "--max-line-length=120 --ignore=E203,W503"
check-license:
name: Check for License headers
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Python dependencies
run: pip install licenseheaders
- name: Download template file
run: wget https://raw.githubusercontent.com/johann-petrak/licenseheaders/master/templates/apache-2.tmpl
- name: Run check
run: |
licenseheaders -t apache-2.tmpl -y "${YEARS}" -o "${OWNER}" -n "${PROJECT}" -u "${URL}" -d . -E "${EXTENSIONS}"
test -z "$(git status --untracked-files=no --porcelain)" || (echo "Please check your license headers!" ; git status --untracked-files=no --porcelain ; false) && echo "License check was successful."
env:
OWNER: "TUM Department of Electrical and Computer Engineering"
PROJECT: "Seal5"
YEARS: "2024"
URL: "https://github.com/tum-ei-eda/seal5.git"
EXTENSIONS: "py c cpp"
EXCLUDE: ".venv models"