Skip to content

Commit

Permalink
ci: 1
Browse files Browse the repository at this point in the history
  • Loading branch information
light-speak committed Oct 30, 2024
2 parents fc4bf1b + 930e30f commit 71f35ee
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ concurrency:
permissions:
contents: read
pull-requests: read
security-events: write

jobs:
verify:
test:
# 避免在 PR 和 push 时重复运行
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/staging') ||
Expand Down Expand Up @@ -53,29 +52,4 @@ jobs:
with:
file: ./coverage.txt
flags: unittests
fail_ci_if_error: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
skip-cache: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

- name: Run Tests for SonarCloud
run: |
go test -coverprofile=coverage.out -json > test-report.json ./...
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
fail_ci_if_error: false

0 comments on commit 71f35ee

Please sign in to comment.