ci: refactor workflows for SonarQube, tag-only Docker builds, and global testing
Tests / Run Tests (push) Has been cancelled
SonarQube Scan / SonarQube Trigger (push) Has been cancelled

- Run SonarQube scans only on main, staging, and feat/* branches
- Build and push Docker images only on semantic version tags
- Add test job that runs on all events
This commit is contained in:
2026-01-28 00:54:47 +07:00
parent 22ad935299
commit 6316430e64
3 changed files with 83 additions and 84 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Tests
on:
push:
pull_request:
types: [opened, synchronize, reopened]
issues:
issue_comment:
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
cache: false
- name: Install dependencies
run: go mod download
- name: Run go vet
run: go vet ./...
- name: Run tests
run: go test -v -p 4 ./...