-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (128 loc) · 4.16 KB
/
Copy pathci.yml
File metadata and controls
154 lines (128 loc) · 4.16 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# .github/workflows/ci.yml
# Continuous Integration für WindowsBridge
# Führt Tests und Validierung auf jedem Push/PR aus
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y shellcheck python3 python3-pip
pip3 install pylint
- name: Bash Syntax Check
run: |
bash -n installer.sh
bash -n modules/system_setup.sh
bash -n modules/wine_setup.sh
bash -n modules/gaming_setup.sh
bash -n modules/updater.sh
bash -n test_system.sh
bash -n test_wine.sh
bash -n test_gaming.sh
bash -n run_all_tests.sh
- name: ShellCheck Analysis
run: |
shellcheck installer.sh
shellcheck modules/*.sh
shellcheck test_*.sh
shellcheck run_all_tests.sh
- name: Python Syntax Check
run: |
python3 -m py_compile gui_launcher.py
- name: Python Linting
run: |
pylint --disable=C0111,W0212 gui_launcher.py || true
- name: License Headers Check
run: |
echo "Checking Apache-2.0 headers..."
grep -l "Apache-2.0" installer.sh
grep -l "Apache-2.0" modules/system_setup.sh
grep -l "Apache-2.0" modules/wine_setup.sh
grep -l "Apache-2.0" modules/gaming_setup.sh
- name: Documentation Check
run: |
test -f LICENSE
test -f README.md
test -f CHANGELOG.md
test -f CONTRIBUTING.md
test -f VERSION
echo "All documentation files present ✅"
- name: File Permissions Check
run: |
test -x installer.sh
test -x modules/system_setup.sh
test -x modules/wine_setup.sh
test -x modules/gaming_setup.sh
echo "All scripts executable ✅"
version-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check VERSION file
run: |
VERSION=$(cat VERSION)
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid VERSION format: $VERSION"
exit 1
fi
echo "VERSION: $VERSION ✅"
- name: Verify CHANGELOG updated
run: |
VERSION=$(cat VERSION)
if ! grep -q "\[$VERSION\]" CHANGELOG.md; then
echo "CHANGELOG.md not updated for version $VERSION"
exit 1
fi
echo "CHANGELOG.md updated ✅"
security-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for hardcoded secrets
run: |
echo "Checking for hardcoded secrets..."
! grep -r "password=" . --include="*.sh" --include="*.py"
! grep -r "api_key=" . --include="*.sh" --include="*.py"
! grep -r "token=" . --include="*.sh" --include="*.py"
echo "No hardcoded secrets found ✅"
- name: Check for SQL injection patterns
run: |
echo "Checking for SQL injection patterns..."
! grep -r "sql_query.*\$" . --include="*.sh"
echo "No obvious SQL injection patterns ✅"
- name: Check for command injection patterns
run: |
echo "Checking for command injection patterns..."
if grep -r 'wine.*\$[^{]' modules/*.sh; then
echo "Warning: Potential command injection found"
fi
echo "Command injection check complete ✅"
markdown-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Markdown Link Check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
file-path: './README.md'
- name: Check documentation completeness
run: |
echo "Checking documentation files..."
test -f README.md
test -f QUICKSTART.md
test -f CHANGELOG.md
test -f CONTRIBUTING.md
test -f SECURITY.md
test -f RELEASE.md
test -f INSTALL_BY_DISTRO.md
echo "All documentation files present ✅"