ci: initial test for drone
This commit is contained in:
parent
34c001473b
commit
ae8667acca
25
.drone.yml
Normal file
25
.drone.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Go Test & Coverage
|
||||||
|
image: golang
|
||||||
|
commands:
|
||||||
|
- TESTCONTAINERS_RYUK_DISABLED=true go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
|
||||||
|
volumes:
|
||||||
|
- name: shared
|
||||||
|
path: /drone/src
|
||||||
|
|
||||||
|
- name: SonarQube Analyses
|
||||||
|
image: aosapps/drone-sonar-plugin
|
||||||
|
settings:
|
||||||
|
sonar_host:
|
||||||
|
from_secret: sonar_host
|
||||||
|
sonar_token:
|
||||||
|
from_secret: sonar_token
|
||||||
|
volumes:
|
||||||
|
- name: shared
|
||||||
|
path: /drone/src
|
||||||
|
volumes:
|
||||||
|
- name: shared
|
||||||
|
temp: {}
|
@ -1,39 +0,0 @@
|
|||||||
name: Gitea Build Check
|
|
||||||
run-name: ${{ gitea.actor }} is testing the build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
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
|
|
||||||
run: TESTCONTAINERS_RYUK_DISABLED=true go test -v ./... -json -coverprofile="coverage.out" | tee "test-report.out"
|
|
||||||
|
|
||||||
- uses: sonarsource/sonarqube-scan-action@master
|
|
||||||
env:
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
|
||||||
with:
|
|
||||||
args: >
|
|
||||||
-Dsonar.projectKey=Anthrove---OtterSpace-SDK
|
|
1
sonar-project.properties
Normal file
1
sonar-project.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
sonar.projectKey=Anthrove---OtterSpace-SDKt
|
Loading…
Reference in New Issue
Block a user