Skip to content

Commit 736122d

Browse files
committed
fix: resolve CI workflow failures
- Replace broken securecodewarrior gosec action with direct installation - Add fallback buildifier installation in CI workflow - Add conditional checks for missing rust directory - Add .gitignore to prevent future node_modules commits
1 parent 00398c4 commit 736122d

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,14 @@ jobs:
333333
334334
- name: Buildifier Check
335335
run: |
336-
# Use bazel to run buildifier (it's already a dependency)
337-
bazel run //:buildifier -- --lint=warn --mode=check $(find . -name "*.bzl" -o -name "BUILD" -o -name "BUILD.bazel")
336+
# Install buildifier if Bazel target is not available
337+
if ! bazel query //:buildifier &>/dev/null; then
338+
go install github.com/bazelbuild/buildtools/buildifier@latest
339+
buildifier --lint=warn --mode=check $(find . -name "*.bzl" -o -name "BUILD" -o -name "BUILD.bazel")
340+
else
341+
# Use bazel to run buildifier (it's already a dependency)
342+
bazel run //:buildifier -- --lint=warn --mode=check $(find . -name "*.bzl" -o -name "BUILD" -o -name "BUILD.bazel")
343+
fi
338344
339345
- name: License Check
340346
run: |

.github/workflows/performance.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ jobs:
8181
bazel build //tinygo:file_ops_component_wasm
8282
8383
# Build Rust component (if exists)
84-
if bazel query //rust:file_ops_rust &>/dev/null; then
84+
if [ -d "rust" ] && bazel query //rust:file_ops_rust &>/dev/null; then
8585
bazel build //rust:file_ops_rust
8686
bazel build //rust:file_ops_component_wasm
87+
else
88+
echo "Rust components not available - skipping Rust builds"
8789
fi
8890
8991
- name: Create Performance Test Data
@@ -135,7 +137,7 @@ jobs:
135137
'wasmtime run --dir=. bazel-bin/tinygo/file_ops_component_wasm.wasm -- copy_file --src perf_test_data/small.txt --dest perf_test_data/wasm_copy.txt'
136138
fi
137139
138-
- name: Benchmark Rust Implementation
140+
- name: Benchmark Rust Implementation
139141
if: (github.event.inputs.benchmark_type == 'all' || github.event.inputs.benchmark_type == 'rust-only' || github.event.inputs.benchmark_type == '') && hashFiles('rust/**') != ''
140142
run: |
141143
echo "## Rust Performance Benchmarks" >> perf_results.md

.github/workflows/security.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ jobs:
3434
toolchain: "1.82.0"
3535

3636
- name: Run Gosec Security Scanner (Go)
37-
uses: securecodewarrior/github-action-gosec@master
38-
with:
39-
args: '-fmt sarif -out go-results.sarif ./tinygo/...'
37+
run: |
38+
# Install gosec
39+
go install github.com/securecodewarrior/gosec/v2/cmd/gosec@latest
40+
41+
# Run gosec security scan
42+
cd tinygo && gosec -fmt sarif -out ../go-results.sarif ./...
4043
continue-on-error: true
4144

4245
- name: Upload Gosec Results to GitHub Security Tab
@@ -48,9 +51,11 @@ jobs:
4851

4952
- name: Run Cargo Audit (Rust)
5053
run: |
51-
if [ -f "rust/Cargo.toml" ]; then
54+
if [ -d "rust" ] && [ -f "rust/Cargo.toml" ]; then
5255
cargo install cargo-audit
5356
cd rust && cargo audit --format json --output audit-results.json || true
57+
else
58+
echo "Rust directory not found - skipping Cargo audit"
5459
fi
5560
5661
- name: Run Trivy Vulnerability Scanner
@@ -108,7 +113,7 @@ jobs:
108113

109114
- name: Rust Dependency Check
110115
run: |
111-
if [ -f "rust/Cargo.toml" ]; then
116+
if [ -d "rust" ] && [ -f "rust/Cargo.toml" ]; then
112117
cargo install cargo-audit cargo-deny
113118
cd rust
114119
@@ -117,6 +122,8 @@ jobs:
117122
118123
# Check licenses and dependency policies
119124
cargo deny check
125+
else
126+
echo "Rust directory not found - skipping Rust dependency checks"
120127
fi
121128
continue-on-error: true
122129

@@ -175,7 +182,7 @@ jobs:
175182
176183
- name: Update Rust Dependencies
177184
run: |
178-
if [ -f "rust/Cargo.toml" ]; then
185+
if [ -d "rust" ] && [ -f "rust/Cargo.toml" ]; then
179186
cd rust
180187
181188
# Update Cargo.toml with latest compatible versions
@@ -187,6 +194,8 @@ jobs:
187194
else
188195
echo "RUST_DEPS_UPDATED=true" >> $GITHUB_ENV
189196
fi
197+
else
198+
echo "Rust directory not found - skipping Rust dependency updates"
190199
fi
191200
192201
- name: Update Bazel Dependencies

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build outputs
8+
dist/
9+
build/
10+
*.log
11+
12+
# OS files
13+
.DS_Store
14+
Thumbs.db
15+
16+
# IDE files
17+
.vscode/
18+
.idea/
19+
*.swp
20+
*.swo
21+
*~
22+
23+
# Bazel
24+
bazel-*

0 commit comments

Comments
 (0)