mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-06-09 18:32:43 +00:00
d6da0e0e13
Add path filters to workflows that fired on every PR/push regardless of the diff: CodeQL, go build, the e2e/EC/vacuum/TLS/plugin-worker integration suites, the Kafka and Postgres gateways, the S3 suites (Ceph s3tests, s3-go, s3-tables, proxy-signature, https, example, filer-group), TUS, and the dev binary/container builds. Each scopes to its subsystem under weed/, its test dir, go.mod/go.sum, and the workflow file, so docs-, helm-, terraform-, rust- or java-only changes no longer trigger a full compile-and-test fleet.
95 lines
2.1 KiB
YAML
95 lines
2.1 KiB
YAML
name: "PostgreSQL Gateway Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/server/postgres/**'
|
|
- 'weed/query/**'
|
|
- 'weed/mq/**'
|
|
- 'test/postgres/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/postgres-tests.yml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/server/postgres/**'
|
|
- 'weed/query/**'
|
|
- 'weed/mq/**'
|
|
- 'test/postgres/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/postgres-tests.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref }}/postgres-tests
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
postgres-basic-tests:
|
|
name: PostgreSQL Basic Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
defaults:
|
|
run:
|
|
working-directory: test/postgres
|
|
steps:
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ^1.25
|
|
id: go
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Configure Docker Hub mirror
|
|
run: |
|
|
echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' | sudo tee /etc/docker/daemon.json
|
|
sudo systemctl restart docker
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-postgres-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-postgres-
|
|
|
|
- name: Start PostgreSQL Gateway Services
|
|
run: |
|
|
make dev-start
|
|
sleep 10
|
|
|
|
- name: Run Basic Connectivity Test
|
|
run: |
|
|
make test-basic
|
|
|
|
- name: Run PostgreSQL Client Tests
|
|
run: |
|
|
make test-client
|
|
|
|
- name: Save logs
|
|
if: always()
|
|
run: |
|
|
docker compose logs > postgres-output.log || true
|
|
|
|
- name: Archive logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: postgres-logs
|
|
path: test/postgres/postgres-output.log
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
make clean || true
|