-
-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (59 loc) · 1.93 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
name: QA Checks
on:
push:
jobs:
runStyLua:
name: Format Lua Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- 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@v4
- name: Download and Setup Selene
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo Kampfkarren/selene --pattern "selene-*-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@v4
- name: Download and Setup Ruff
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pipx install ruff
- name: Run the Ruff Linter for Python Code
run: ruff check "$PWD"
runBlackFormatter:
name: Format Python Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run the Black Formatter on Python Files
run: |
pip install black
black . --check