1
0
forked from baron/baron-sso

test/ 없으면 스킵

This commit is contained in:
2026-01-21 16:51:28 +09:00
parent be722068b5
commit 25b1dcfdaa

View File

@@ -24,78 +24,62 @@ jobs:
if: ${{ inputs.run_lint == true }}
runs-on: ubuntu-latest
steps:
# 리포지토리에서 소스 코드를 체크아웃합니다.
- name: Checkout code
uses: actions/checkout@v4
# Go 언어 환경을 설정합니다.
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
go-version: "1.25"
cache-dependency-path: backend/go.sum
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
# Go 백엔드 코드의 정적 분석을 수행합니다.
- name: Lint Go backend
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
working-directory: backend
args: --enable-only=gofmt,gofumpt
# Flutter SDK 환경을 설정합니다.
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
# Flutter/Dart 프론트엔드 코드의 정적 분석을 수행합니다.
- name: Analyze Flutter frontend
run: |
cd frontend
flutter pub get
flutter analyze
flutter analyze --no-fatal-warnings --no-fatal-infos
backend-tests:
needs: lint
if: ${{ inputs.run_backend_tests == true }}
runs-on: ubuntu-latest
services:
# 통합 테스트에 사용될 Redis 서비스 컨테이너입니다.
# 운영 환경과 일치하도록 포트를 6399로 설정합니다.
redis:
image: redis:7-alpine
command: redis-server --port 6399
options: >
--health-cmd "redis-cli -p 6399 ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6399:6399
# 통합 테스트에 사용될 ClickHouse 서비스 컨테이너입니다.
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
clickhouse:
image: clickhouse/clickhouse-server:24.6
ports:
- 9000:9000
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8123/ping"]
interval: 10s
timeout: 5s
retries: 5
options: >
--health-cmd "wget -qO- 'http://localhost:8123/ping'" --health-interval 10s --health-timeout 5s --health-retries 5
env:
REDIS_ADDR: localhost:6399
CLICKHOUSE_HOST: localhost
REDIS_ADDR: redis:6379
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT_NATIVE: 9000
steps:
# 리포지토리에서 소스 코드를 체크아웃합니다.
- name: Checkout code
uses: actions/checkout@v4
# Go 언어 환경을 설정합니다.
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
go-version: "1.25"
cache-dependency-path: backend/go.sum
# 백엔드 디렉토리의 모든 Go 테스트를 실행합니다.
- name: Run backend tests
run: |
cd backend
@@ -106,19 +90,20 @@ jobs:
if: ${{ inputs.run_frontend_tests == true }}
runs-on: ubuntu-latest
steps:
# 리포지토리에서 소스 코드를 체크아웃합니다.
- name: Checkout code
uses: actions/checkout@v4
# Flutter SDK 환경을 설정합니다.
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"
cache: true
# 프론트엔드 디렉토리의 모든 위젯 테스트를 실행합니다.
- name: Run frontend tests
run: |
cd frontend
flutter pub get
flutter test
if [ -d test ]; then
flutter test
else
echo "No frontend tests: skipping (test/ directory not found)."
fi