Skip to content

Trigger tests and analysis on master (#1290) #3335

Trigger tests and analysis on master (#1290)

Trigger tests and analysis on master (#1290) #3335

Workflow file for this run

name: "Static Analysis"
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request_target:
types: [opened, synchronize]
branches:
- "master"
jobs:
Static-Check:
strategy:
matrix:
os:
- name: ubuntu
version: 24.04
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
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 lint
uses: jfrog/.github/actions/golangci-lint@main
Go-Sec:
strategy:
matrix:
os:
- name: ubuntu
version: 24.04
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
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
No-Replace:
strategy:
matrix:
os:
- name: ubuntu
version: 24.04
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
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