Skip to content

detect redis over tls #92

detect redis over tls

detect redis over tls #92

Workflow file for this run

# Copyright 2022 Praetorian Security, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Used as inspiration: https://github.com/caddyserver/caddy/blob/master/.github/workflows/ci.yml
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Checkout code
uses: actions/checkout@v3
- name: Print Go version and environment
id: vars
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
# Calculate the short SHA1 hash of the git commit
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
- name: Cache the build cache
uses: actions/cache@v3
with:
path: ${{ steps.vars.outputs.go_cache }}
key: ${{ runner.os }}-go-ci-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-ci
- name: Get dependencies
run: |
go mod download
- name: Build all binaries
env:
CGO_ENABLED: 0
run: |
go build ./cmd/fingerprintx
- name: Run tests
run: |
go test ./pkg/plugins/services/...
# From https://github.com/reviewdog/action-golangci-lint
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v3
- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: check
env:
TAG: ${{ steps.vars.outputs.version_tag }}