forked from HypersonicED/aniray
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (86 loc) · 2.71 KB
/
super-linter.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
name: Format and Lint Code
on:
push:
branches: [main, development]
pull_request:
branches: [main, development]
jobs:
format-web:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Apply Prettier
uses: creyD/[email protected]
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: Github Actions
commit_user_email: [email protected]
commit_message: Apply prettier styling to web files
format-python:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: iSort files
uses: isort/isort-action@master
with:
configuration: "--profile black"
- name: Apply Black style
uses: psf/black@stable
with:
options: "--verbose"
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: Github Actions
commit_user_email: [email protected]
commit_message: Apply isort and black python style
format-cpp:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Format code with clang-format
uses: DoozyX/[email protected]
with:
source: .
clangFormatVersion: 13
inplace: True
style: file
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: Github Actions
commit_user_email: [email protected]
commit_message: Apply clang-format
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
PYTHON_FLAKE8_CONFIG_FILE: .flake8
JAVASCRIPT_DEFAULT_STYLE: prettier
VALIDATE_ALL_CODEBASE: true
VALIDATE_CPP: true
VALIDATE_CLANG_FORMAT: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}