Skip to content

fix: update go

fix: update go #150

Workflow file for this run

name: CI
on:
pull_request:
branches: [ master, main ]
permissions:
pull-requests: read
jobs:
test-pr-ci:
runs-on: ubuntu-latest
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
GIT_TAG: ${{ needs.set-version.outputs.semVer }}
GOVCS: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: git prep
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}
- uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: make test
run: |
export DOCKER_HOST=unix:///var/run/docker.sock
make REVISION=$GITHUB_SHA test
- name: Publish Junit style Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/.coverage/report-junit.xml'
- name: Analyze with SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
SEMVER: $SEMVER
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args:
-Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }}
-Dsonar.go.tests.reportPaths=/github/workspace/controller/.coverage/report-junit.xml,/github/workspace/seeder/.coverage/report-junit.xml,/github/workspace/kubebuilder-controller/.coverage/report-junit.xml
-Dsonar.go.coverage.reportPaths=/github/workspace/controller/.coverage/out,/github/workspace/seeder/.coverage/out,/github/workspace/kubebuilder-controller/.coverage/out