This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
plug-sdk/.gitea/workflows/ build_check.yaml

41 lines
1.4 KiB
YAML
Raw Normal View History

2024-07-08 13:07:48 +00:00
name: Gitea Build Check
run-name: ${{ gitea.actor }} is testing the build
on:
push:
branches:
- main
2024-07-08 13:08:23 +00:00
- V2
2024-07-08 13:07:48 +00:00
pull_request:
branches: [ "main" ]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Go environment
uses: https://github.com/actions/setup-go@v5
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.22.0 # optional
# Path to the go.mod file.
go-version-file: ./go.mod # optional
# Set this option to true if you want the action to always check for the latest available version that satisfies the version spec
check-latest: true # optional
# Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
cache: true # optional
- name: Execute Go Test files with coverage report
2024-07-08 13:16:37 +00:00
run: go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
2024-07-08 13:07:48 +00:00
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
with:
args: >
2024-07-08 13:29:14 +00:00
-Dsonar.projectKey=Anthrove---plug-sdk
-Dsonar.exclusions=pkg/grpc/*