mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-22 01:35:24 -04:00
4b75eed6b7
* feat: add support for PgBouncer in database initialization * refactor: consolidate gorm configuration for database connection * Add MySQL and multi-driver DB integration tests (#535) * feat: streamline integration tests by using a centralized docker-compose file * fix: add timeout * refactor: replace inline service definitions with docker-compose action for integration tests * fix: update pgbouncer image and environment variable names for consistency
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
name: Run Unit Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: test-unit-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Start integration services
|
|
uses: hoverkraft-tech/compose-action@v2.0.2
|
|
with:
|
|
compose-file: |
|
|
integration/docker/docker-compose.ci.yml
|
|
services: |
|
|
redis
|
|
postgres
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "UV_PATH=$(which uv)" >> $GITHUB_ENV
|
|
|
|
- name: Setup License
|
|
run: go run cmd/license/generate/main.go
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Run unit tests
|
|
run: go test -v -timeout 1m ./cmd/... ./internal/... ./pkg/...
|