From e0251b2d5494e7cbce03f0e68758ea644daca54d Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 1 Dec 2026 18:24:47 -0800 Subject: [PATCH] ci: run the postgres_flat S3 and FUSE tests against Postgres Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK --- .github/workflows/postgres-flat-tests.yml | 63 +++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/postgres-flat-tests.yml diff --git a/.github/workflows/postgres-flat-tests.yml b/.github/workflows/postgres-flat-tests.yml new file mode 100644 index 0000000000..5fba9a6552 --- /dev/null +++ b/.github/workflows/postgres-flat-tests.yml @@ -0,0 +1,63 @@ +name: "postgres_flat Filer Store Tests" + +on: + push: + branches: [ master, main ] + paths: + - 'weed/**' + - 'test/postgres_flat/**' + - '.github/workflows/postgres-flat-tests.yml' + pull_request: + branches: [ master, main ] + paths: + - 'weed/**' + - 'test/postgres_flat/**' + - '.github/workflows/postgres-flat-tests.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }} + +permissions: + contents: read + +jobs: + postgres-flat: + name: S3 and POSIX over postgres_flat + runs-on: ubuntu-24.04 + timeout-minutes: 30 + + services: + postgres: + image: postgres:17 + env: + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 5s + --health-timeout 5s + --health-retries 20 + + steps: + - name: Checkout code + uses: actions/checkout@v7 + + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: 'go.mod' + cache: ${{ runner.environment == 'github-hosted' }} + + - name: Repair the fusermount3 setuid bit + uses: ./.github/actions/fix-fusermount-setuid + + - name: Build SeaweedFS + run: go build -o weed/weed -buildvcs=false ./weed + + - name: Run tests + env: + RUN_POSTGRES_TESTS: "1" + WEED_BINARY: ${{ github.workspace }}/weed/weed + run: go test -v -count=1 -timeout=20m ./test/postgres_flat/