diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0cab2b6..9eba318 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -28,6 +28,12 @@ jobs: exit 1 fi + - name: Vet + run: /usr/local/go/bin/go vet ./src/... + + - name: Run tests + run: /usr/local/go/bin/go test -v ./src/... + # build: # name: Build binaries # runs-on: shell-ubuntu @@ -36,11 +42,11 @@ jobs: # - name: Checkout repo # run: git clone "${{ secrets.G_CLONE_URL }}" . # - # - name: Build for Linux amd64 - # run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-linux-amd64 . - # +# - name: Build for Linux amd64 + # run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-linux-amd64 ./src + # - name: Build for Windows amd64 - # run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-windows-amd64.exe + # run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 /usr/local/go/bin/go build -o auth-proxy-windows-amd64.exe ./src # # - name: Package binaries # run: | diff --git a/Dockerfile b/Dockerfile index 5c7b7e6..3aa84bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN /usr/local/go/bin/go env -w GOPROXY=https://go.iranserver.com/repository/go/ COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o auth-proxy . +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o auth-proxy ./src # Runtime stage FROM docker.iranserver.com/alpine:3.23