Skip to content

Commit

Permalink
Merge branch 'main' into golang-ci-enable-all
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Dec 27, 2023
2 parents 429d730 + 4425e20 commit c7df623
Show file tree
Hide file tree
Showing 141 changed files with 5,920 additions and 3,290 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
push:
branches: [main, release/*]
pull_request:
branches:
- "main"
- "release/*"
branches: [main, release/*]

jobs:
build:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Flow build and test

on:
pull_request:
branches:
- "main"
branches: [main]
push:
branches: [main]

Expand Down Expand Up @@ -96,7 +95,7 @@ jobs:

- name: run tests
run: |
gotestsum --format testname -- -p 8 ./... -timeout 2400s
gotestsum --format testname -- -p 8 ./... -timeout 1200s
working-directory: ./flow
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: GolangCI-Lint

on:
pull_request:
branches:
- "main"
branches: [main]
paths: [flow/**]

jobs:
golangci-lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: clippy-action

on:
pull_request:
branches:
- "main"
branches: [main]
paths: [nexus/**]

jobs:
clippy:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ui-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: Build & Test UI

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]
paths: [ui/**]

jobs:
build-test:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ui-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: Lint UI

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]
paths: [ui/**]

permissions:
checks: write
Expand Down
29 changes: 22 additions & 7 deletions dev-peerdb.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
#!/bin/bash
set -Eeuo pipefail
#!/bin/sh
if test -z "$USE_PODMAN"
then
if ! command -v docker &> /dev/null
then
if command -v podman-compose
then
echo "docker could not be found on PATH, using podman-compose"
USE_PODMAN=1
else
echo "docker could not be found on PATH"
exit 1
fi
fi
fi

if ! command -v docker &> /dev/null
if test -z "$USE_PODMAN"
then
echo "docker could not be found on PATH"
exit 1
DOCKER="docker compose"
EXTRA_ARGS="--no-attach temporal --no-attach pyroscope --no-attach temporal-ui"
else
DOCKER="podman-compose --podman-run-args=--replace"
EXTRA_ARGS=""
fi

export PEERDB_VERSION_SHA_SHORT=local-$(git rev-parse --short HEAD)
docker compose -f docker-compose-dev.yml up --build \
--no-attach temporal --no-attach pyroscope --no-attach temporal-ui
exec $DOCKER -f docker-compose-dev.yml up --build $EXTRA_ARGS
6 changes: 4 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres", "-U", "postgres"]
test: ["CMD", "pg_isready", "-d", "postgres", "-U", "postgres"]
interval: 10s
timeout: 30s
retries: 5
Expand Down Expand Up @@ -133,7 +133,7 @@ services:
dockerfile: stacks/flow.Dockerfile
target: flow-snapshot-worker
environment:
<<: [*flow-worker-env]
<<: [*catalog-config, *flow-worker-env]
depends_on:
temporal-admin-tools:
condition: service_healthy
Expand Down Expand Up @@ -209,6 +209,8 @@ services:
DATABASE_URL: postgres://postgres:postgres@catalog:5432/postgres
PEERDB_FLOW_SERVER_HTTP: http://flow_api:8113
PEERDB_PASSWORD:
depends_on:
- flow-api

volumes:
pgdata:
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres", "-U", "postgres"]
test: ["CMD", "pg_isready", "-d", "postgres", "-U", "postgres"]
interval: 10s
timeout: 30s
retries: 5
Expand Down Expand Up @@ -112,7 +112,7 @@ services:
container_name: flow-snapshot-worker
image: ghcr.io/peerdb-io/flow-snapshot-worker:latest-dev
environment:
<<: [*flow-worker-env]
<<: [*catalog-config, *flow-worker-env]
depends_on:
temporal-admin-tools:
condition: service_healthy
Expand Down Expand Up @@ -174,6 +174,8 @@ services:
<<: *catalog-config
DATABASE_URL: postgres://postgres:postgres@catalog:5432/postgres
PEERDB_FLOW_SERVER_HTTP: http://flow_api:8113
depends_on:
- flow-api

volumes:
pgdata:
Expand Down
6 changes: 5 additions & 1 deletion flow/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ linters:
linters-settings:
forbidigo:
tests: false
stylecheck:
checks:
- all
- '-ST1003'
lll:
line-length: 120
line-length: 144
tab-width: 4
revive:
rules:
Expand Down
Loading

0 comments on commit c7df623

Please sign in to comment.