chore(ci): update golangci-lint and fix script paths
Some checks failed
Build and test / Build (pull_request) Successful in 12s
Build and test / Lint (pull_request) Failing after 1m21s
Build and test / Test (Linux) (pull_request) Successful in 51s

- bump golangci-lint-action to v7 and version to v2.1.6
- correct directory paths in `smoke_test.sh`
- update `test` and `test-ci` targets in Makefile
This commit is contained in:
juanarias8
2026-03-10 20:35:56 -05:00
parent 9a3d863696
commit b6478d7928
3 changed files with 11 additions and 11 deletions

View File

@@ -42,11 +42,11 @@ jobs:
- name: Download dependencies - name: Download dependencies
run: go mod download run: go mod download
- name: Install golangci-lint
run: GOTOOLCHAIN=local go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
- name: Lint - name: Lint
uses: golangci/golangci-lint-action@v6 run: golangci-lint run --allow-parallel-runners
with:
install-mode: goinstall
version: v1.64.8
test-linux: test-linux:
name: Test (Linux) name: Test (Linux)
@@ -112,4 +112,4 @@ jobs:
run: make build-ci run: make build-ci
- name: Run smoke tests - name: Run smoke tests
run: GREYWALL_TEST_NETWORK=1 ./scripts/smoke_test.sh ./greywall run: ./scripts/smoke_test.sh ./greywall

View File

@@ -38,11 +38,11 @@ build-ci: download-tun2socks
$(eval GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown")) $(eval GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown"))
$(GOBUILD) -ldflags "-s -w -X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME) -X main.gitCommit=$(GIT_COMMIT)" -o $(BINARY_NAME) -v ./cmd/greywall $(GOBUILD) -ldflags "-s -w -X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME) -X main.gitCommit=$(GIT_COMMIT)" -o $(BINARY_NAME) -v ./cmd/greywall
test: test: download-tun2socks
@echo "Running tests..." @echo "Running tests..."
$(GOTEST) -v ./... $(GOTEST) -v ./...
test-ci: test-ci: download-tun2socks
@echo "CI: Running tests with coverage..." @echo "CI: Running tests with coverage..."
$(GOTEST) -v -race -coverprofile=coverage.out ./... $(GOTEST) -v -race -coverprofile=coverage.out ./...

View File

@@ -25,11 +25,11 @@ GREYWALL_BIN="${1:-}"
if [[ -z "$GREYWALL_BIN" ]]; then if [[ -z "$GREYWALL_BIN" ]]; then
if [[ -x "./greywall" ]]; then if [[ -x "./greywall" ]]; then
GREYWALL_BIN="./greywall" GREYWALL_BIN="./greywall"
elif [[ -x "./dis./greywall" ]]; then elif [[ -x "./dist/greywall" ]]; then
GREYWALL_BIN="./dis./greywall" GREYWALL_BIN="./dist/greywall"
else else
echo "Building greywall..." echo "Building greywall..."
go build -o ./greywall ./cm./greywall go build -o ./greywall ./cmd/greywall
GREYWALL_BIN="./greywall" GREYWALL_BIN="./greywall"
fi fi
fi fi
@@ -121,7 +121,7 @@ run_test "read file in workspace" "pass" "$GREYWALL_BIN" -c "cat $WORKSPACE/test
# Test: Write outside workspace blocked # Test: Write outside workspace blocked
# Create a settings file that only allows write to current workspace # Create a settings file that only allows write to current workspace
SETTINGS_FILE="$WORKSPAC./greywall.json" SETTINGS_FILE="$WORKSPACE/greywall.json"
cat > "$SETTINGS_FILE" << EOF cat > "$SETTINGS_FILE" << EOF
{ {
"filesystem": { "filesystem": {