Skip to content

fix: update go

fix: update go #152

Workflow file for this run

name: CI
on:
pull_request:
branches: [ master, main ]
permissions:
pull-requests: read
jobs:
set-version:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: '5.x'
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v1
id: gitversion
- name: echo VERSIONS
run: |
echo "REVISION -> $GITHUB_SHA"
echo "VERSION -> $GITVERSION_SEMVER"
pr-steps:
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: Install Task
uses: arduino/setup-task@v2
with:
version: ${{ inputs.taskVersion }}
repo-token: ${{ inputs.githubToken }}
- name: make test
run: |
task test-seeder
- 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