Skip to content

fix: partition mutex #39

fix: partition mutex

fix: partition mutex #39

Workflow file for this run

on: [push]
name: Test
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: get repository name
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.21' # The Go version to download (if necessary) and use.
- name: download golangci.yml
run: |
[[ ! -f ".golangci.yml" ]] && curl -kfsSL -O https://raw.githubusercontent.com/worldline-go/guide/main/lint/.golangci.yml || true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout 5m --new-from-rev=HEAD~1 --issues-exit-code=0
- name: Run tests
run: |
GOPATH="$(dirname ${PWD})" golangci-lint run --out-format checkstyle --issues-exit-code=0 ./... > golangci-lint-report.out
go test -short -coverprofile=coverage.out -json ./... > test-report.out
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=${{ github.repository_owner }}
-Dsonar.projectKey=${{ github.repository_owner }}_${{ env.REPOSITORY_NAME }}
-Dsonar.go.coverage.reportPaths=coverage.out
-Dsonar.go.tests.reportPaths=test-report.out
-Dsonar.go.golangci-lint.reportPaths=golangci-lint-report.out
-Dsonar.sources=.
-Dsonar.exclusions=**/vendor/**,**/*_test.go
-Dsonar.tests=.
-Dsonar.test.inclusions=**/*_test.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}