Skip to content

fix: skip unknown trees in root validation monitor (#337) #1

fix: skip unknown trees in root validation monitor (#337)

fix: skip unknown trees in root validation monitor (#337) #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install additional tools
run: |
npm install -g @apidevtools/swagger-cli
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
- name: Start light-prover container
run: |
docker run -d -p 3001:3001 docker.io/sergeytimoshin/prover:latest
- name: Wait for light-prover to be ready
run: |
echo "Waiting for light-prover to be ready..."
CONTAINER_ID=$(docker ps -q --filter ancestor=docker.io/sergeytimoshin/prover:latest)
for i in {1..60}; do
if curl -f http://localhost:3001/health > /dev/null 2>&1; then
echo "Prover is ready!"
exit 0
fi
echo "Attempt $i/60: prover not ready yet, waiting 10 seconds..."
docker logs --tail 10 $CONTAINER_ID
sleep 10
done
echo "Prover failed to become ready within 10 minutes"
docker logs $CONTAINER_ID
exit 1
- name: Set environment variables
run: |
echo "MAINNET_RPC_URL=https://api.mainnet-beta.solana.com" >> $GITHUB_ENV
echo "DEVNET_RPC_URL=https://api.devnet.solana.com" >> $GITHUB_ENV
echo "TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres" >> $GITHUB_ENV
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres" >> $GITHUB_ENV
- name: Run migrations
run: cargo run --bin photon-migration up
- name: Run tests
run: cargo test