Skip to content

Merge pull request #33 from asecurityteam/renovate/all #23

Merge pull request #33 from asecurityteam/renovate/all

Merge pull request #33 from asecurityteam/renovate/all #23

Workflow file for this run

on:
push:
pull_request: #sonar refuses to display branch analysis results on Free plan even for OSS
types: [opened, synchronize, reopened]
jobs:
golang:
runs-on: ubuntu-latest # we execute everything except make in docker anyway
name: GoLang Basics
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar scan
- name: FS Permissions
# workaround for permissions with contaner attempting to create directories
run: chmod 777 -R "$(pwd)"
- name: Dep
run: make dep
- name: Lint
run: make lint
- name: Coverage Setup
# workaround for permissions with container attempting to create directory
run: mkdir .coverage && chmod 777 .coverage
- name: Unit Tests
run: make test
- name: Integration Tests
run: make integration
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run on PRs and once we merge to main, as we need baseline runs for main in Sonar
if: ${{ ( github.event_name == 'pull_request' ) || ( github.ref == 'refs/heads/main' ) }}