diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 2743798..1ca3485 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -43,10 +43,9 @@ jobs: run: go mod download - name: Lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: - install-mode: goinstall - version: v1.64.8 + version: v2.1.6 test-linux: name: Test (Linux) diff --git a/Makefile b/Makefile index 0b9b09b..a253e65 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,11 @@ build-ci: download-tun2socks $(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 -test: +test: download-tun2socks @echo "Running tests..." $(GOTEST) -v ./... -test-ci: +test-ci: download-tun2socks @echo "CI: Running tests with coverage..." $(GOTEST) -v -race -coverprofile=coverage.out ./... diff --git a/scripts/smoke_test.sh b/scripts/smoke_test.sh index 811fa07..fcbac6c 100755 --- a/scripts/smoke_test.sh +++ b/scripts/smoke_test.sh @@ -25,11 +25,11 @@ GREYWALL_BIN="${1:-}" if [[ -z "$GREYWALL_BIN" ]]; then if [[ -x "./greywall" ]]; then GREYWALL_BIN="./greywall" - elif [[ -x "./dis./greywall" ]]; then - GREYWALL_BIN="./dis./greywall" + elif [[ -x "./dist/greywall" ]]; then + GREYWALL_BIN="./dist/greywall" else echo "Building greywall..." - go build -o ./greywall ./cm./greywall + go build -o ./greywall ./cmd/greywall GREYWALL_BIN="./greywall" fi fi @@ -121,7 +121,7 @@ run_test "read file in workspace" "pass" "$GREYWALL_BIN" -c "cat $WORKSPACE/test # Test: Write outside workspace blocked # 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 { "filesystem": {