Added jf rbs command and its unit tesst #5733
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Static Analysis" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
pull_request_target: | |
types: [opened, synchronize] | |
branches: | |
- "master" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Go-Lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Setup Go with cache | |
uses: jfrog/.github/actions/install-go-with-cache@main | |
- name: Run Go vet | |
run: go vet -v ./... | |
Static-Check: | |
name: Static Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Setup Go with cache | |
uses: jfrog/.github/actions/install-go-with-cache@main | |
- name: Run golangci linter | |
uses: jfrog/.github/actions/golangci-lint@main | |
Go-Sec: | |
name: Go-Sec | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Setup Go with cache | |
uses: jfrog/.github/actions/install-go-with-cache@main | |
- name: Run Go-Sec scanner | |
uses: jfrog/.github/actions/gosec-scanner@main | |
ShellCheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
with: | |
ignore_paths: "*test*" | |
No-Replace: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Check for uncommented replace instructions on JFrog dependencies | |
run: | | |
if grep -E '^[[:space:]]*replace[[:space:]]+github\.com/jfrog' go.mod; then | |
echo "❌ Found uncommented replace directives for JFrog dependencies in go.mod" | |
echo "All replace directives for JFrog dependencies should be commented out" | |
exit 1 | |
else | |
echo "✅ No uncommented replace directives for JFrog dependencies found in go.mod" | |
fi |