Skip to content

Add test and example to EventData derive macro #4

Add test and example to EventData derive macro

Add test and example to EventData derive macro #4

Workflow file for this run

name: Check
on:
push:
# TODO: github-actions branch should be removed once we switch to main
branches: [main, github-actions-ci]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clippy
run: cargo clippy -- --deny warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: rustfmt
run: cargo fmt --all --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run 'cargo test' (excluding epoch_pg)
run: cargo test --workspace --exclude epoch_pg
test_epoch_pg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start Postgres containers needed for epoch_pg
run: docker compose -f epoch_pg/docker-compose.yml up -d
- name: Wait for Postgres to be ready
run: |
for i in {1..10}; do
if pg_isready -h localhost -p 5432; then
echo "Postgres is ready"
exit 0
fi
echo "Waiting for Postgres..."
sleep 3
done
echo "Postgres did not become ready in time"
exit 1
- name: Run 'cargo test' only for epoch_pg
run: cargo test --package epoch_pg -- --test-threads=1
- name: Stop containers for epoch_pg
run: docker compose -f epoch_pg/docker-compose.yml down