-
-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (78 loc) · 2.83 KB
/
qa-checks.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
name: QA Checks
on:
push:
jobs:
runShellCheck:
name: Lint Shell Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download and Setup Shellcheck
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo koalaman/shellcheck --pattern "*.linux.x86_64.tar.xz"
tar --extract --file shellcheck*.tar.xz
cp shellcheck*/shellcheck /usr/local/bin/
echo "Downloaded Shellcheck v$(shellcheck --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run Shellcheck
run: shellcheck "setup"
runStyLua:
name: Format Lua Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download and Setup Stylua
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo JohnnyMorganz/StyLua --pattern "stylua-linux-x86_64.zip"
unzip "stylua-linux-x86_64.zip"
cp stylua /usr/local/bin/
echo "Downloaded Stylua v$(stylua --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run the Stylua formatter for Lua code
run: stylua . --check
runSeleneLinter:
name: Lint Lua Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download and Setup Selene
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo Kampfkarren/selene --pattern "selene-light-*-linux.zip"
unzip "selene-light-*-linux.zip"
cp selene /usr/local/bin/ && chmod u+x /usr/local/bin/selene
echo "Downloaded Selene v$(selene --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run Selene to Lint Lua Code
run: selene .
runRuff:
name: Lint Python Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download and Setup Ruff
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo astral-sh/ruff --pattern "ruff-x86_64-unknown-linux-gnu.tar.gz"
tar --extract --file "ruff-x86_64-unknown-linux-gnu.tar.gz"
cp ruff /usr/local/bin/
echo "Downloaded Ruff v$(ruff --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run the Ruff Linter for Python Code
run: ruff .
runBlackFormatter:
name: Format Python Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run the Black Formatter on Python Files
run: |
pip install black
black . --check