name: Test SemSimian Server
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Run cargo tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Check versions
run: |
rustup --version
rustup update
rustup --version
cargo --version
rustc --version
rustup show
- name: Free up disk space on runner
run: |
sudo apt-get clean -y || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/dotnet || true
docker system prune --all --volumes --force || true
sudo rm -rf /var/lib/apt/lists/* || true
df -h
- name: Download Phenio
run: |
mkdir -p ~/.data/oaklib
# If the remote file is phenio.db.gz, stream it and write the decompressed DB directly
curl -sL https://data.monarchinitiative.org/monarch-kg/latest/phenio.db.gz | gunzip -c > ~/.data/oaklib/phenio.db
# verify
ls -lh /home/runner/.data/oaklib
df -h
- name: Run Tests
run: |
cargo test test_compare -- --nocapture
cargo test test_search -- --nocapture
build-docker:
name: Test Building Docker Image
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: false