Skip to content

Commit

Permalink
Create Postgres step in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
arik-so committed Oct 13, 2023
1 parent f1f4e8a commit 78934a1
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,36 @@ jobs:
- name: Build on Rust ${{ matrix.toolchain }}
run: |
cargo build --verbose --color always
test:
name: Run Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Build on Rust ${{ matrix.toolchain }}
run: |
cargo test --verbose --color always
env:
RAPID_GOSSIP_TEST_DB_HOST: localhost
RAPID_GOSSIP_TEST_DB_NAME: rapid_gossip_test_db
RAPID_GOSSIP_TEST_DB_USER: postgres
RAPID_GOSSIP_TEST_DB_PASSWORD: postgres
RAPID_GOSSIP_SYNC_SERVER_LOG_LEVEL: gossip

0 comments on commit 78934a1

Please sign in to comment.