Skip to content

Commit

Permalink
feat(.github/workflows): add telemetry-postgres to GHA
Browse files Browse the repository at this point in the history
refs: #10
  • Loading branch information
jan-matejka committed Jan 19, 2025
1 parent 68d52af commit 3ec2307
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/mq-cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-telemetry-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: telemetry
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-cpp-dev:
if: true
needs: build-base-debian
Expand Down Expand Up @@ -76,6 +89,7 @@ jobs:
needs:
- build-producer-cpp
- build-postgres
- build-telemetry-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: cpp
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mq-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-telemetry-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: telemetry
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-golang-dev:
if: true
needs: build-base-debian
Expand Down Expand Up @@ -76,6 +89,7 @@ jobs:
needs:
- build-producer-golang
- build-postgres
- build-telemetry-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: golang
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mq-haskell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ jobs:
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-telemetry-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: telemetry
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-base-haskell:
if: true
needs: build-base-debian
Expand Down Expand Up @@ -92,6 +105,7 @@ jobs:
needs:
- build-producer-haskell
- build-postgres
- build-telemetry-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: haskell
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mq-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-telemetry-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: telemetry
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-python-dev:
if: true
needs: build-base-debian
Expand Down Expand Up @@ -76,6 +89,7 @@ jobs:
needs:
- build-producer-python
- build-postgres
- build-telemetry-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: python
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mq-run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,24 @@ jobs:
--health-interval 5s
--health-timeout 1s
--health-retries 5
telemetry-postgres-test:
image: ghcr.io/${{ github.repository_owner }}/code-golf_telemetry_postgres:${{ inputs.pg_tag }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 1s
--health-retries 5
steps:
- name: make check
env:
PG_TEST_DSN: postgres-test:5432
TEST_TELEMETRY_POSTGRES: telemetry-postgres:5442
# I have no idea why github sets HOME=/github/home. Its root owned
# and there is nothing useful. Hypothetically it could be a volume
# (related to /__w (workdir)) and share data between the host and
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mq-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ jobs:
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-telemetry-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: telemetry
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-base-debian-testing:
if: true
runs-on: ubuntu-latest
Expand Down Expand Up @@ -76,6 +89,7 @@ jobs:
needs:
- build-producer-rust
- build-postgres
- build-telemetry-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: rust
Expand Down

0 comments on commit 3ec2307

Please sign in to comment.